0

Hi

I have declared the class in the header file

class Test{
    public: 
    //  Constructor
    Test();
    //  Variables
    IClassFact  *m_pClassFact;
};

But I am getting an error

error C2143: syntax error : missing ';' before '*'

And also I am getting this error

error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   

Can anyone please help me
Regards
Karan

Edited by pyTony: fixed formatting

5
Contributors
4
Replies
5
Views
9 Years
Discussion Span
Last Post by ArkM
0

what's the type of 'IClassFact' , if its another class is the header file included? compiler is not able to deduce the type.

0

1. Use code tags:
[code=c++] ... sources ..

[/code]
2. If class IClassFact is not defined in the incude point, use incomplete type declaration just before class Test definition:

class IClassFact; // this is a class name, I'll define it later
class Test { ...
...
IClassFact* m_pClassFact;
};

It's enough to declare pointers to this incomplete type.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.