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: Thu, 30 Sep 1999 23:56:00 -0000 Message-ID: References: X-SW-Source: 1999-09n/msg00145.html Message-ID: <19990930235600.n-2f19wjwCn10cXOSSydqTiT6XSniUlRvAt5QmBPj48@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