Error 2629: unexpected 'class ClassA ('
Posted on 2003-11-13
Sorry if I explain this badly, I'm not quite sure what is relevant.
I'm getting the error above when I try to compile my project. The line in question is in ClassA.h and looks something like:
ClassA(ClassB* theParent, type theType);
where type is a typedef inside classA and ClassB is #included above the constructor.
There's another error on the same line:
Error C2238: unexpected token(s) preceding ';'
The error seems to come up while compiling a third class which does not refer to ClassB or ClassA or refer to anything that does.
The problem arose when I moved the typedef from another unrelated class and put it in ClassA. This typedef is used as a parameter and return type for several functions both inside and outside ClassA (but not in ClassB or either of the other two classes I mentioned)
What's going on? I'm very confused.