tags:

views:

83

answers:

3

I have included the proper

Header Files , Header Gard

but i cannot instantiate a specific class

Getting Error

error C2065: 'ClassName' : undeclared identifier



Sample Code

Class A{

 //instantiate class B

}


Class B {


 //need to instantiate Class A

}
+1  A: 

btw. you don't have ; at the end of class definition.

noisy
thanks but its done :) its just describe a scenario
Sudantha
NO you describe NO scenario, because there is NO real code, and NO instanciation written. Your question just a fuzzy joke for us for the moment.
Stephane Rolland
+1  A: 

Under my understanding there is a circular dependency between classes A and B. So you need to use forward declaration for at least one of those two classes (or even both).

Flinsch
My Classes are in separate .cpp files any idea ?
Sudantha
Yes i have done all of them !
Sudantha
Yes, that's the standard procedure to have a separate .cpp file for each class. And *what* "all of them" have you done? You don't really want to get help, do you?
Flinsch