S
shuisheng
Dear All,
I have a libaray which provides a base class of name Base and several
derived classes of name Derived1, Derived2 and so on.
I want to add a client data into those classes, such as
class MyBase: public Base
{
ClientDataType ClientData;
};
class MyDerived1: public Derived1
{
ClientDataType ClientData;
};
class MyDerived2: public Derived2
{
ClientDataType ClientData;
};
Howeven, I still want MyDerived1, MyDerived2 is derived from MyBase and
I don't want to change the provided library. My code cannot realize
it.Anyone can give me some suggestion.
I appreicate your kind help.
Shuisheng
I have a libaray which provides a base class of name Base and several
derived classes of name Derived1, Derived2 and so on.
I want to add a client data into those classes, such as
class MyBase: public Base
{
ClientDataType ClientData;
};
class MyDerived1: public Derived1
{
ClientDataType ClientData;
};
class MyDerived2: public Derived2
{
ClientDataType ClientData;
};
Howeven, I still want MyDerived1, MyDerived2 is derived from MyBase and
I don't want to change the provided library. My code cannot realize
it.Anyone can give me some suggestion.
I appreicate your kind help.
Shuisheng