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?


How is that possible, since 'A' does not have a reset method in it?  At
the time he tries to call a->reset(), the compiler won't know the method
can be called.  Shouldn't only methods defined in 'A' be able to be
called on 'a'?

Thanks,
Lyle


-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On
Behalf Of Eljay Love-Jensen
Sent: Thursday, November 18, 2004 5:20 PM
To: Ishwar Rattan; gcc-help@gcc.gnu.org
Subject: Re: Question on derived class?

Hi Ishwar,

Your question is a general C++ question, and off-topic for this forum.

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

Yes.

HTH,
--Eljay


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