S
Susan Baker
Hi,
I have the following code which refuses to compile:
Snippet from header file:
class C ;
class A ;
class L ;
class T ;
class TC {
private:
void *ct ;
std::vector < PB > dat ; /* One or more */
std::list < C > pat ;
std::list < A > nts ;
std::list < L > ls ;
std::list < T > tl ;
int bIdx ; /* base index */
myEnum sType ;
bool spread ;
protected:
class BPat {
public:
BPat() ;
~BPat() ;
virtual long gSD( void ) = 0 ;
virtual double gSV( void ) = 0 ;
//<snip> ...
};
public:
class TL : protected BPat {
private:
int sd ;
int ed ;
double sv ;
double ev ;
A text ; // <- Compiler complains here !!
Error message:
error C2079: 'TC::TL::text' uses undefined class 'A'
I used class A earlier on in the declaration of class TC, and that was
fine, why is the compiler suddenly (i.e. several lines further down),
complaining that A is an unidentified class?
Any pointers much apprreciated - mtia
S
I have the following code which refuses to compile:
Snippet from header file:
class C ;
class A ;
class L ;
class T ;
class TC {
private:
void *ct ;
std::vector < PB > dat ; /* One or more */
std::list < C > pat ;
std::list < A > nts ;
std::list < L > ls ;
std::list < T > tl ;
int bIdx ; /* base index */
myEnum sType ;
bool spread ;
protected:
class BPat {
public:
BPat() ;
~BPat() ;
virtual long gSD( void ) = 0 ;
virtual double gSV( void ) = 0 ;
//<snip> ...
};
public:
class TL : protected BPat {
private:
int sd ;
int ed ;
double sv ;
double ev ;
A text ; // <- Compiler complains here !!
Error message:
error C2079: 'TC::TL::text' uses undefined class 'A'
I used class A earlier on in the declaration of class TC, and that was
fine, why is the compiler suddenly (i.e. several lines further down),
complaining that A is an unidentified class?
Any pointers much apprreciated - mtia
S