I have a class with a member m_preferences(a vector containing an association between a word and functions).
In this class, m_preferencesit is not static and, therefore, any instance of the class has its own specific one m_preferences.
class Base{
private:
Preferences m_preferences;
public:
...
}
Then I created a derived class, where it m_preferencesbecame static, because I wanted every new instance of this class to share the same data for preferences, no matter what happens.
class Derived: public Base{
private:
static Preferences m_preferences;
public:
...
}
I got a communication error.
Is it possible to do what I want to do (converting a non-static element to static through inheritance)?
If this is not the philosophy of this impossibility? Was this planned?
Thanks,
Yours faithfully,
Ronan
ronan