Abstract Template Classes?
-
I'm now trying to learn template classes, and I have some questions... Is it possible to create abstract template classes? If it is, how do I inherit from them? And how do I create an instance of a template class, let's say for one instance for 'int' and another for my own class 'MyClass'? Sprudling
-
I'm now trying to learn template classes, and I have some questions... Is it possible to create abstract template classes? If it is, how do I inherit from them? And how do I create an instance of a template class, let's say for one instance for 'int' and another for my own class 'MyClass'? Sprudling
It is poosible to create abstracet template classes (just give it a try :) You inherit from them as you would a normal class. template class CBaseClass { //ex: virtual int DoIt() = 0; .... }; template class CDerive : public CBaseClass { }; //an instance: CDerive MyIntclass; shouldn't be all that difficult?
-
It is poosible to create abstracet template classes (just give it a try :) You inherit from them as you would a normal class. template class CBaseClass { //ex: virtual int DoIt() = 0; .... }; template class CDerive : public CBaseClass { }; //an instance: CDerive MyIntclass; shouldn't be all that difficult?
-
Hi, I've some doubt in templates. what Happens if we have a static variable in a template base class. and we pass two different parameters while instatiating it. is the static "variable Single" or does each instance has its own diffrent variable
There's a difference between instantiating a template class (making a template class into a concrete class) and instantiating an object of a class.
-
There's a difference between instantiating a template class (making a template class into a concrete class) and instantiating an object of a class.
How do we make a template class into a concrete class