Okay, so this class defines a Cross Object, a Cross is a Mobile, is an Object..
Code:#ifndef C_CROSS_H #define C_CROSS_H #include "Mobiles.h" class Cross : public Mobiles { public: MS3DModel *Model1; // pointer to the model all cross instances use }; #endif
What happens if we want more than one Cross Object on the screen at the same time? I don't want to have to hard code another instance of the cross object, how can I make it so the user can create an instance of this object, (say we have a peasant object that has a build function, that can click build->cross, we place another cross on the screen, at a given location)
Is this what template classes are used for? I'm sure someone here can enlighten me