I have created my first template class, from which both class A and class B descend. Now, in C.h i include both A.h and B.h
As explained here you can only use the same template once per translation unit. I understand that - but how do I prevent the error above? Since A and B use the same template in their class definition lines, they will both be pulled into the same C.h file. I don't see how I can split this into multiple files.
Do I need to put an include guard in the template .h file? (But then how will the second usage of the template know the T in class is different?