template derived class

if i want to define a derived class from a template base the way i know is
1
2
3
4
5
6
7
template<class x> class Base {
    
};
class derived:public Base<int>
{

};


but if also derived is template with same class x how can we do that??
ok found it
1
2
3
4
template<class x> class derived:public Base<x>
{

};
but if also derived is template with same class x how can we do that??
I don't quite understand what you mean. Maybe that?

1
2
3
4
template<class x> class derived:public Base<x>
{

};


EDIT: 2 min
Last edited on
Topic archived. No new replies allowed.