Mail Archives: djgpp/1998/09/16/07:45:21
Uhfgood (uhfgood AT aol DOT com) wrote:
: Hello my name is Keith and i'm new to this group. I just got C for dummies
: volume one. Well basically I have two questions. Firstly when i'm in rawhide
: I make my source file save it and compile it. I made a simple hello world
: style program... like this
: #include <stdio.h>
: void main()
: {
: printf("Goodbye, cruel world!\n");
: }
: okay well it runs fine and does what it supposed to but the execute for this
: little program is 83k... Why is this so big? and then I also get a Warning
: that comes up in RHides message window, that says something like (function main
: does not return "int"), or some such thing and i'm wondering why it does this?
: I'm not necessarily a newbie to programming but i am new to C... and new to
: DJGPP, so please go easy on me even tho these are such trivial questions.
: Thanks
It means what it says; main should be declared to return int:
"int main( ..."
Perhaps you should get a better book if this stupid dummy book says you
should write "void main()"?
Right,
MartinS
- Raw text -