Re: Typedef structs
Al Bowers <xabowers@rapid sys.com> writes:
[...][color=blue]
> My guess is that you are compiling with C++ Compiler. I believe
> the keyword is not needed in C++ and function main returns type
> void. In C, the keyword is required and function main returns type
> int. The C Language is defined by the Standard that I mentioned above
> and not by your compiler.[/color]
main returns int in both C and C++. (C++ is actually more strict than
C; both allow implementation-defined declarations of main, but only C
those implementation-defined declarations to have a return type other
than int.)
--
Keith Thompson (The_Other_Keit h) kst-u@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Al Bowers <xabowers@rapid sys.com> writes:
[...][color=blue]
> My guess is that you are compiling with C++ Compiler. I believe
> the keyword is not needed in C++ and function main returns type
> void. In C, the keyword is required and function main returns type
> int. The C Language is defined by the Standard that I mentioned above
> and not by your compiler.[/color]
main returns int in both C and C++. (C++ is actually more strict than
C; both allow implementation-defined declarations of main, but only C
those implementation-defined declarations to have a return type other
than int.)
--
Keith Thompson (The_Other_Keit h) kst-u@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Comment