Click here to Skip to main content
16,006,531 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: why get active frame? Pin
panthal2-Nov-07 2:32
panthal2-Nov-07 2:32 
GeneralRe: why get active frame? Pin
toxcct2-Nov-07 2:35
toxcct2-Nov-07 2:35 
QuestionMy complex polymorphic inheritance problem.. Its like a puzzle !!! can u solve ?? Pin
quakeboy2-Nov-07 1:42
quakeboy2-Nov-07 1:42 
GeneralRe: My complex polymorphic inheritance problem.. Its like a puzzle !!! can u solve ?? Pin
Matthew Faithfull2-Nov-07 1:58
Matthew Faithfull2-Nov-07 1:58 
GeneralRe: My complex polymorphic inheritance problem.. Its like a puzzle !!! can u solve ?? Pin
quakeboy2-Nov-07 2:13
quakeboy2-Nov-07 2:13 
GeneralRe: My complex polymorphic inheritance problem.. Its like a puzzle !!! can u solve ?? Pin
Matthew Faithfull2-Nov-07 3:00
Matthew Faithfull2-Nov-07 3:00 
AnswerRe: My complex polymorphic inheritance problem.. Its like a puzzle !!! can u solve ?? Pin
quakeboy2-Nov-07 2:03
quakeboy2-Nov-07 2:03 
GeneralRe: My complex polymorphic inheritance problem.. Its like a puzzle !!! can u solve ?? Pin
TClarke2-Nov-07 3:56
TClarke2-Nov-07 3:56 
Firstly just a small correction:
In the program section the first line is as follows

c1 *myc1 = new myc1();

That certainly did not compile.
c1 *myc1 = new c1();

will.

In the method update you have the line:
if(tmp==b1)

did you mean:
if(tmp==obj)


Also why the use of the word function if this is C++?

When you instantiate Rel you cast a c1 pointer to a b1 pointer.
When you call f1();
you pass in a this pointer from within a2 in to the update method in the Rel class.
You then cast that pointer to a b1 pointer and compare to see if they are the same pointer.
If they are you call the success method.
So basically you're casting a c1* to a b1*, no problem there.
and casting an a1* to a b1*

I'm curious, how are you maintaining a pointer to Rel in a2 when Rel contains a pointer to a b1, a subclass of a2?


Cheers
Tom

Philosophy: The art of never getting beyond the concept of life.

Religion: Morality taking credit for the work of luck.

"The object of life is not to be on the side of the majority, but to escape finding oneself in the ranks of the insane."
- Marcus Aurelius

AnswerRe: My complex polymorphic inheritance problem.. Its like a puzzle !!! can u solve ?? Pin
led mike2-Nov-07 4:42
led mike2-Nov-07 4:42 
QuestionNot getting process details (process name, process path) for some processes Pin
Subhash Karemore2-Nov-07 1:34
Subhash Karemore2-Nov-07 1:34 
QuestionRe: Not getting process details (process name, process path) for some processes Pin
David Crow2-Nov-07 2:52
David Crow2-Nov-07 2:52 
Questionmodeless dialog box Pin
AnayKulkarni2-Nov-07 0:21
AnayKulkarni2-Nov-07 0:21 
AnswerRe: modeless dialog box Pin
toxcct2-Nov-07 0:24
toxcct2-Nov-07 0:24 
AnswerRe: modeless dialog box Pin
ThatsAlok2-Nov-07 3:05
ThatsAlok2-Nov-07 3:05 
AnswerRe: modeless dialog box Pin
Peter Weyzen2-Nov-07 8:30
Peter Weyzen2-Nov-07 8:30 
QuestionHow can we get pictures in Mainframe Pin
saravana0012-Nov-07 0:21
saravana0012-Nov-07 0:21 
QuestionRe: How can we get pictures in Mainframe Pin
ThatsAlok2-Nov-07 3:11
ThatsAlok2-Nov-07 3:11 
AnswerRe: How can we get pictures in Mainframe Pin
Iain Clarke, Warrior Programmer2-Nov-07 4:28
Iain Clarke, Warrior Programmer2-Nov-07 4:28 
QuestionResume a suspend process Pin
inovah2-Nov-07 0:18
inovah2-Nov-07 0:18 
AnswerRe: Resume a suspend process Pin
toxcct2-Nov-07 0:20
toxcct2-Nov-07 0:20 
GeneralRe: Resume a suspend process Pin
inovah2-Nov-07 3:17
inovah2-Nov-07 3:17 
QuestionRe: Resume a suspend process Pin
David Crow2-Nov-07 2:54
David Crow2-Nov-07 2:54 
AnswerRe: Resume a suspend process Pin
inovah2-Nov-07 5:22
inovah2-Nov-07 5:22 
QuestionRe: Resume a suspend process Pin
David Crow2-Nov-07 5:29
David Crow2-Nov-07 5:29 
QuestionDialog ID comparision Pin
KASR12-Nov-07 0:04
KASR12-Nov-07 0:04 

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.