Message-Id: <199812311409.OAA03793@remus.clara.net> From: "Arthur" To: Subject: RE: Hello world isn't working :( Date: Thu, 31 Dec 1998 14:08:25 -0000 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 Importance: Normal In-Reply-To: <003701be3455$c7004220$81f8c6c3@johans-dator> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Reply-To: djgpp AT delorie DOT com > >> My hello world doen't work :( how can this be?? > >> > >> #include > > > Delete that row! You should #include (for printf) and #include (for exit) > >> > >> int main() > > > it should be main() or main(void) No, ANSI says that main() _should_ return an int. > >> { > >> printf("Hello world!\n"); > >> exit(0); > > > You don't need that one either. When it comes to the end of main, it exits > anyway Yeah, but main() should return an int, so you should really return one at the end of your program. I use return 0; instead of exit(0); because then you don't need to include stdlib.h. DJGPP doesn't require you to return anything at the end (it adds it if it's not there), but that doesn't mean that other compilers don't mind it. James Arthur - jaa AT arfa DOT clara DOT net http://www.jado.org/users/arfa/ ICQ#15054819