| | |
error C2143: syntax error : missing ';' before '*'
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jul 2008
Posts: 46
Reputation:
Solved Threads: 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
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
Last edited by karang; Dec 2nd, 2008 at 12:48 am. Reason: To Add more information
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:
It's enough to declare pointers to this incomplete type.
[code=c++]
... sources ..
[/code]
2. If class IClassFact is not defined in the incude point, use incomplete type declaration just before class Test definition:
c++ Syntax (Toggle Plain Text)
class IClassFact; // this is a class name, I'll define it later class Test { ... ... IClassFact* m_pClassFact; };
![]() |
Similar Threads
- Error C2143 (C++)
- main.cpp(147) : error C2143: syntax error : missing ';' before '<' (C++)
- syntax error : missing ';' before '*' (C++)
- error C2059: syntax error : 'namespace' (C++)
- Help with error C2504 & C2143 (C++)
- Compiling Error? (C++)
- Help with a missing ';' (C++)
- Wierd error messages with calculator program (C++)
- "missing storage-class or type specifiers" error (C++)
Other Threads in the C++ Forum
- Previous Thread: Mind-blowing problem here (At least for me)
- Next Thread: Function 'initgraph' should have a prototype
| Thread Tools | Search this Thread |
api array based beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion count database delete deploy desktop developer directshow dll dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph homeworkhelp homeworkhelper iamthwee ifstream input int integer lib linkedlist linux list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg sorting string strings struct temperature template templates text tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets






