[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Hello World doesn't work



*-Havoc Pennington <rhpennin@midway.uchicago.edu>
|
| On Fri, 27 Nov 1998, Kent West wrote:
| > 
| >   main()
| 
| A long shot, but technically the above is illegal; you have to do:
| int main(int argc, char* argv[])

It can also be 'int main(void)', which is equivalent to 'main()'.

| then return something from main, or call exit().
| 
| maybe the lack of a return or exit call from main prevents the io buffers
| from getting flushed? 

Kent, try the following on the troublesome computer:

#include <stdio.h>

int main(void)
{
  printf("Saluton!\n");
  fflush(stdout);

  return 0;
}

-- 
...Unix, MS-DOS, and MS Windows (also known as the Good, the Bad,
and the Ugly).                                       (Matt Welsh)
olet@ifi.uio.no   [-: .elOle. :-]   olet@debian.org


Reply to: