On Thu, 2003-01-02 at 00:18, Christopher Henderson wrote:
> My first program, a simple "Hello World", is as follows
>
> #include < stdio.h>
>
> void main()
> {
> printf("\nHello World\n");
> }
>
> I go to a console and type gcc hello.c as stated in the tutorial and get
> the following error spit out at me -
>
> hello.c:1:20: stdio.h: No such file or directory
Remove the space before the header name.
> hello.c: In function `main':
> hello.c:4: warning: return type of `main' is not `int'
The C standard requires that the return type of the "main" function be
int, not void. Your main function should always be declared:
int main( int argc, char ** argv )
or, equivalently:
int main( int argc, char * argv[] )
--
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list