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]

RE: Question on derived class?


Hi Lyle,

>How is that possible, since 'A' does not have a reset method in it?

It is possible. By putting the virtual reset() method in the A interface class.

(Obviously, I didn't go into details as to the implementation. Ishwar's question only asked if it was possible or not.)

>Shouldn't only methods defined in 'A' be able to be called on 'a'?

Correct. :-)

Sincerely,
--Eljay


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