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

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Jul 2008
Posts: 46
Reputation: karang is an unknown quantity at this point 
Solved Threads: 0
karang karang is offline Offline
Light Poster

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

 
0
  #1
Dec 2nd, 2008
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
Last edited by karang; Dec 2nd, 2008 at 12:48 am. Reason: To Add more information
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 440
Reputation: Agni is a jewel in the rough Agni is a jewel in the rough Agni is a jewel in the rough 
Solved Threads: 68
Sponsor
Agni's Avatar
Agni Agni is offline Offline
Posting Pro in Training

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

 
0
  #2
Dec 2nd, 2008
what's the type of 'IClassFact' , if its another class is the header file included? compiler is not able to deduce the type.
thanks
-chandra
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 55
Reputation: addicted is an unknown quantity at this point 
Solved Threads: 0
addicted's Avatar
addicted addicted is offline Offline
Junior Poster in Training

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

 
0
  #3
Dec 2nd, 2008
I hope IclassFact is not a class template?
check!
00110101
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 320
Reputation: cikara21 is an unknown quantity at this point 
Solved Threads: 63
cikara21's Avatar
cikara21 cikara21 is offline Offline
Posting Whiz

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

 
0
  #4
Dec 2nd, 2008
Maybe IClassFact is a reference class only..
.:-cikara21-:.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 2,001
Reputation: ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of 
Solved Threads: 343
ArkM's Avatar
ArkM ArkM is offline Offline
Postaholic

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

 
0
  #5
Dec 2nd, 2008
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:
  1. class IClassFact; // this is a class name, I'll define it later
  2. class Test { ...
  3. ...
  4. IClassFact* m_pClassFact;
  5. };
It's enough to declare pointers to this incomplete type.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC