KDevelop/C++ question

From: patrick carosso (carossopatrick_at_yahoo.it)
Date: 09/12/04


Date: Sun, 12 Sep 2004 11:17:52 GMT

Hello,
I'm working on a large KDevelop 2.1 project.
Now and then (but NOT always) the compilation of
files such the following fails, with:
 
>ClassB.h:40: syntax error before `*' token

#include <ClassA.h>
class ClassB {
...
...
 ClassA *pClassA; //this is the line which produces the error

};
 

It seems if the ClassA type is undefined, even if it really
is in ClassA.h.
If I put a :
 
class ClassA;

before the definition of ClassB the error disappears. Is it normal?
Why does this happen?
Thank you!