M
mjm
Folks,
Please help me with the following problems:
********************************************
1. I have a class template
template<class Base> class Matrix : public Base { /* .... */ }
then
typedef Matrix<UpperTriangular> UTRMatrix;
My question is now: how do I refer to the class UTRMatrix in a forward
declaration? The following does not work
class UTRMatrix;
("Conflicting types for struct UTRMatrix").
********************************************
2. When I try a forward declaration
std::string;
I get the error message: "specialization of string after
instantiation".
**********************************************
3. I have a class MyClass with a static const int member J.
Now in a header file I have to refer to MyClass::J.
I don't want to include MyClass.h so I am trying the forward
declarations
class MyClass;
extern int MyClass::J;
The compiler does not like that:
"Struct MyClass not yet defined".
How should I do it?
Many thanks.
Please help me with the following problems:
********************************************
1. I have a class template
template<class Base> class Matrix : public Base { /* .... */ }
then
typedef Matrix<UpperTriangular> UTRMatrix;
My question is now: how do I refer to the class UTRMatrix in a forward
declaration? The following does not work
class UTRMatrix;
("Conflicting types for struct UTRMatrix").
********************************************
2. When I try a forward declaration
std::string;
I get the error message: "specialization of string after
instantiation".
**********************************************
3. I have a class MyClass with a static const int member J.
Now in a header file I have to refer to MyClass::J.
I don't want to include MyClass.h so I am trying the forward
declarations
class MyClass;
extern int MyClass::J;
The compiler does not like that:
"Struct MyClass not yet defined".
How should I do it?
Many thanks.