From mboxrd@z Thu Jan 1 00:00:00 1970 From: cmg5@home.com (Chris Gregory) To: help-gcc@gnu.org Subject: Re: Newbie gcc question Date: Fri, 01 Oct 1999 00:00:00 -0000 Message-ID: References: X-SW-Source: 1999-q3/msg00551.html Message-ID: <19991001000000.3uc5uGBr9gPLlaF32i_98tQfH3oP0Mo68NtogltJkNg@z> On Sun, 12 Sep 1999 17:30:24 -0500, Wayne Willson wrote: >I'm a sys/network admin trying to learn C (this could be the root of the >problem) with the GNU C compiler. > >In a learning C book I just bought it gives this example > >-------------------------------------------- >#include > >viod main() >{ > printf("Hello Universe"); >} > > > >I type "gcc -o hello hello.c" > >This is what I get "hello.c: In function `main': >hello.c:6: warning: return type of `main' is not `int'" >------------------------------------------------------ Well, it still worked, you got a warning not an error. Even when I don't need a return I usually just accept that main is supposed to return an int and just add a return 0; to the end of the program. It shuts up the annoying warning. -- Chris Gregory