inheritance

Hi,

I have created 2 separate template classes VEC and MAT. However, I just came across a library where the MAT (matrix) class is implemented and as VEC is just a special case of MAT, they just derive VEC from MAT and it inherits most of the functions. I have not had much experience with inheritance and templates, in a simple case how could this be done?

thank you.
1
2
3
4
5
6
7
8
9
template <typename Type>
class MAT
{
};

template <typename Type>
class VEC : public MAT<Type>
{
};


I think you are finding this.
Topic archived. No new replies allowed.