Click here to Skip to main content
15,918,742 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: (option2) Get COM interface from other process Pin
Bill Wilson14-Aug-02 13:25
Bill Wilson14-Aug-02 13:25 
GeneralUse the ROT for debugging Pin
Vi214-Aug-02 20:34
Vi214-Aug-02 20:34 
GeneralRe: Use the ROT for debugging Pin
Aaron Schaefer15-Aug-02 3:09
Aaron Schaefer15-Aug-02 3:09 
GeneralRe: Use the ROT for debugging Pin
Vi215-Aug-02 3:31
Vi215-Aug-02 3:31 
GeneralRe: Get COM interface from other process Pin
Michael Dunn14-Aug-02 15:00
sitebuilderMichael Dunn14-Aug-02 15:00 
GeneralRe: Get COM interface from other process Pin
Aaron Schaefer15-Aug-02 3:05
Aaron Schaefer15-Aug-02 3:05 
GeneralRe: Get COM interface from other process Pin
Stuart Dootson14-Aug-02 20:49
professionalStuart Dootson14-Aug-02 20:49 
QuestionCalling methods in child classes from base class? Pin
clintsinger14-Aug-02 9:30
clintsinger14-Aug-02 9:30 
To start off I will show the code then explain the problem.

<br />
class A<br />
{<br />
public:<br />
  void MethodOne() { MethodTwo(); }<br />
  void MethodTwo() { TRACE("Hello from A\n"); }<br />
};<br />
<br />
class B : public A<br />
{<br />
public:<br />
  void MethodTwo() { TRACE("Hello from B\n"); }<br />
};<br />
<br />
<br />
void UsesClass()<br />
{<br />
  B* b = new B;<br />
  b->MethodOne();<br />
}<br />


What I want is for MethodOne() from A to call the MethodTwo() from B. What it does is call the MethodTwo() from A instead. How do I get the MethodTwo of B to be called?

Cheers,
Clint
AnswerRe: Calling methods in child classes from base class? Pin
Chris Losinger14-Aug-02 9:36
professionalChris Losinger14-Aug-02 9:36 
GeneralRe: Calling methods in child classes from base class? Pin
clintsinger14-Aug-02 10:08
clintsinger14-Aug-02 10:08 
AnswerRe: Calling methods in child classes from base class? Pin
moredip14-Aug-02 9:48
moredip14-Aug-02 9:48 
GeneralRe: Calling methods in child classes from base class? Pin
clintsinger14-Aug-02 10:09
clintsinger14-Aug-02 10:09 
GeneralStupid Question Pin
John Pepper14-Aug-02 8:47
John Pepper14-Aug-02 8:47 
GeneralRe: Stupid Question Pin
Ranjan Banerji14-Aug-02 8:57
Ranjan Banerji14-Aug-02 8:57 
GeneralRe: Stupid Question Pin
Chris Losinger14-Aug-02 9:00
professionalChris Losinger14-Aug-02 9:00 
GeneralRe: Stupid Question Pin
Anonymous14-Aug-02 9:36
Anonymous14-Aug-02 9:36 
GeneralRe: Stupid Question Pin
Christian Graus14-Aug-02 12:53
protectorChristian Graus14-Aug-02 12:53 
GeneralPhilsophical Question Pin
Chris Losinger14-Aug-02 13:27
professionalChris Losinger14-Aug-02 13:27 
GeneralEmbedded C++ 3.0 Member Variables Pin
Like2Byte14-Aug-02 8:28
Like2Byte14-Aug-02 8:28 
GeneralRe: Embedded C++ 3.0 Member Variables Pin
Bill Wilson14-Aug-02 8:50
Bill Wilson14-Aug-02 8:50 
GeneralRe: Embedded C++ 3.0 Member Variables Pin
Like2Byte14-Aug-02 9:22
Like2Byte14-Aug-02 9:22 
GeneralRe: Embedded C++ 3.0 Member Variables Pin
Bill Wilson14-Aug-02 9:50
Bill Wilson14-Aug-02 9:50 
GeneralRe: Embedded C++ 3.0 Member Variables Pin
Like2Byte14-Aug-02 10:01
Like2Byte14-Aug-02 10:01 
GeneralRe: Embedded C++ 3.0 Member Variables Pin
Bill Wilson14-Aug-02 10:40
Bill Wilson14-Aug-02 10:40 
QuestionIs this bad design (CComVariant) ? Pin
Todd Smith14-Aug-02 8:27
Todd Smith14-Aug-02 8:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.