P
parag_paul
hi All ,
I am giving the pseudo code about the problem I am talking about .
I have a class hiearchy which looks like this.
class A;
template <class X1, class X2> class B : public A{}
template <class X3> class C: public B<Xreal1, Xreal2>;
Now is it necessary to put the following statement before the line
above like the following
template <Xreal1, Xreal2> class B;
Anyway, the line "template <class X3> class C: public B<Xreal1,
Xreal2>;" is already showing the path to this hierarhcy,
And also, why do that have to instantiate the class B when you are
talking about the class C.
Since I am getting g++ compilation errors due to it.
I am not able to give the code out as it is too sphegtti type and get
some people confused ( like I did )
The pseudo code should help I guess
I am giving the pseudo code about the problem I am talking about .
I have a class hiearchy which looks like this.
class A;
template <class X1, class X2> class B : public A{}
template <class X3> class C: public B<Xreal1, Xreal2>;
Now is it necessary to put the following statement before the line
above like the following
template <Xreal1, Xreal2> class B;
Anyway, the line "template <class X3> class C: public B<Xreal1,
Xreal2>;" is already showing the path to this hierarhcy,
And also, why do that have to instantiate the class B when you are
talking about the class C.
Since I am getting g++ compilation errors due to it.
I am not able to give the code out as it is too sphegtti type and get
some people confused ( like I did )
The pseudo code should help I guess