class CBase {
public :
CBase() {}
void foo(); //Method that uses 'bar'.
vec2</*let sub-classes decide*/> bar;
};
class CNeedsFloat : public CBase {
public :
CNeedsFloat() {foo();}
//vec2<float> bar;
};
class CNeedsShort : public CBase {
public :
CNeedsShort() {foo();}
//vec2<short> bar;
};
Might not be the best example. Whatever.
Any help would be appreciated.