I searched everywhere, read books, articles but I am not able to understand how to work with templates when there are more than 1 class. Let's say I have Class A and it is template class, then I create another Template class B and in Class A, I use object of class B with operator + to add class A and class B objects and return class B object
Then I create another base abstract class C and I have to extend class A according to class C. Whereas, both class A and B has template as: template with one parameter T. and class C has template: Parameter T and another parameter is Class Derived.
What does it mean by class derived and how to extend class A according to class C.
I have played with inheritence and everything and I was thinking I am good at C++ but when I started using Templates. I am feeling worse at it
Please help me understand templates and and how to work with other fetures of language like operator overlaoding, inheritence etc?
Regards
Aucun commentaire:
Enregistrer un commentaire