Question on derived class?

Ishwar Rattan ishwar@pali.cps.cmich.edu
Fri Nov 19 00:04:00 GMT 2004


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



More information about the Gcc-help mailing list