Hi,
I am trying to use a template for my classes, eg:
I am eventually aiming to hold all the objects within a single linked list.Code:template<class VEHICLE> class SportsCar { //data members/functions }
My question though is that my classes whilst having the same member functions, they also have different data members.
Is this a problem? The tutorials I have read show the use of Templates, but the data members are always the same, unlike mine.
Perhaps I should declare all the different data members used by the separate inherited classes within the base class?
Any advice is appreciated.
Thanks!![]()



LinkBack URL
About LinkBacks




CornedBee