warning: return type of main is not int
Joe Buck
jbuck@synopsys.com
Fri Jan 16 20:09:00 GMT 1998
> > The C++ language standard says that main returns int. The compiler
> > is warning you that what you are typing is not legal C++.
> >
> > > void main(int argc, char *argv[])
> ...
> I'm actually a beginner.
> If so, how can I fix it?
I'll answer this one, but *please* don't use the egcs mailing list to
ask beginner C++ questions. Try a C++ book or comp.lang.c++.moderated
(I won't advise the unmoderated comp.lang.c++ to anyone).
Just change the "void" to "int".
More information about the Gcc
mailing list