Wednesday, May 30, 2007

Confusing Compiler Error Messages

If I leave the semicolon off a class declaration I get the following set of confusing error messages:

[C++ Warning] QuerySet.cpp(19): W8058 Cannot create pre-compiled header: header incomplete

[C++ Error] QuerySet.cpp(20): E2111 Type 'QuerySet' may not be defined here

[C++ Error] QuerySet.cpp(20): E2136 Constructor cannot have a return type specification

Add the semicolon to the end of the class declaration and all these problems go away.

No comments: