class App { private: int count = 0; public: App(void); App(int); virtual ~App(void); int getCount(void); }; class Derived : virtual public App { public: Derived(); } int main() { Derived d1;//count 1 Derived d2;//count should be 2 now }
static
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)