Quote:The reason for this is that when you define a class locally (within a *.cpp) you have to define the functions within the class. You can't just declare them like you would in a header.
That's just wrong. The compiler doesn't care if the function is inline or out-of-line in the .cpp file -- in fact, the compiler just compiles a stream of code; the #include <> parts are replaced by the actual file contents by the pre-processor before the compiler even sees the text.
As for the original problem: it looks almost as if you're trying to compile as C source, instead of compiling as C++ source. Check the file name, or check the compiler options.