Hi to all!
I have some .h file with:
class ForwardDeclarationClass; // forward declaration of class
class ForwardDeclarationClass; // forward declaration of class
To copy to clipboard, switch view to plain text mode
In same header file there is:
class MyClass : public QGlWidget
{
....
private:
ForwardDeclarationClass* d;
}
class MyClass : public QGlWidget
{
....
private:
ForwardDeclarationClass* d;
}
To copy to clipboard, switch view to plain text mode
In the .cpp file I have:
...
...
...
class ForwardDeclarationClass
{
....
....
}
...
...
...
class ForwardDeclarationClass
{
....
....
}
To copy to clipboard, switch view to plain text mode
and after that there are defined all corresponding methods (in same .cpp file).
I try to compile this Qt project and I get following error:
forward declaration of `struct ForwardDeclarationClass'
forward declaration of `struct ForwardDeclarationClass'
To copy to clipboard, switch view to plain text mode
What is wrong?
Bookmarks