7

Pointer to object type

view full story
linux-howto

http://stackoverflow.com – I've been trying to create an hierarchy of classes, having each class contain a nested struct which contains data. ////////Class.h//////////////////////////// #ifndef _CLASS_H_ #define _CLASS_H_ #include <stdio.h> class A{//Base protected: struct dataA{ int v1, v2; }; public: A(); virtual void met1(); dataA * const set; const dataA * const get; }; class B : public A{//Child1 protected: struct dataB : public dataA{ int v3, v4; }; public: B(); virtual void met2(); dataB * const set; const dataB * const get; (HowTos)