Parse?
I think that is the entire code of the OP. I''m guessing he didn''t include any header files and that''s why he''s getting the error, meaning that he did do exactly what we asked him to do and now he knows the problem. The ''beginners'' forum works again.
Some aspect of your code is incomplete. A function is spelled wrong, or you have a problem with puncuation marks. This means that the compiler is having a problem with a statement. Here is an example.
//There is an error here.
cout<<
It should say something like this:
In line 2, parse error.
Scott Simontis
Game Programmer in Training
Have a nice day!
Current Project: Waiting for OpenGL Game Programming Book
//There is an error here.
cout<<
It should say something like this:
In line 2, parse error.
Scott Simontis
Game Programmer in Training
Have a nice day!
Current Project: Waiting for OpenGL Game Programming Book
quote:Original post by kdogg
I think that is the entire code of the OP.
I didn''t just ask for the code.
quote:Original post by Miserable
Sort of. main() must indeed return a value, but keep in mind that if the main() function does not explicitly return a value, it will implicitly return 0 once control reaches the end of the function.
Any idea why the committee felt they had to introduce a special rule for main? Allowing void main instead would have made more sense.
AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.
quote:Original post by Arild Fines
Allowing void main instead would have made more sense.
What? Why?
[ Google || Start Here || ACCU || MSDN || STL || GameCoding || BarrysWorld || E-Mail Me ]
quote:Original post by Arild Fines
Any idea why the committee felt they had to introduce a special rule for main?
Because of especially idiotic backward-compatibility considerations. The committee wanted to keep compatibility with certain K&R programs which omitted the return-value. Only, those programs still won''t compile since they also omit a return-type. Clever, huh?
quote:
Allowing void main instead would have made more sense.
Or not special-casing main().
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement