This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Question on derived class?


Assume that A is pure virtual class with some public
methods.

B is derived from A

Class B : virtual A {
public:
     // all methods of A are defined here +
     A new method is also defined (here only)
     -- call it reset()
protected:
     // ...
};

Now B is initiated as

static B b;
A *a = b;

Is it possible to access b.reset() using a->reset()?

-ishwar


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]