Click here to Skip to main content
15,904,934 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Multiple inheritance Pin
Gary Kirkham14-Apr-03 7:26
Gary Kirkham14-Apr-03 7:26 
GeneralRe: Multiple inheritance Pin
Tim Smith14-Apr-03 6:08
Tim Smith14-Apr-03 6:08 
B *b = static_cast <B *> (static_cast <C *> (this));

This assumes this is a pointer to A.

You do have to remember that in theory, this is very unsafe since it assumes that the member function is in fact being invoked from an instance of C. However, as long as that is the case, it works perfectly well.

Tim Smith

I'm going to patent thought. I have yet to see any prior art.
GeneralRe: Multiple inheritance Pin
Maximilien14-Apr-03 6:28
Maximilien14-Apr-03 6:28 
GeneralRe: Multiple inheritance Pin
Gary Kirkham14-Apr-03 7:43
Gary Kirkham14-Apr-03 7:43 
GeneralRe: Multiple inheritance Pin
Tim Smith14-Apr-03 9:51
Tim Smith14-Apr-03 9:51 
GeneralRe: Multiple inheritance Pin
#realJSOP14-Apr-03 6:42
professional#realJSOP14-Apr-03 6:42 
QuestionCreateProcess ??? Pin
will138314-Apr-03 5:38
will138314-Apr-03 5:38 
AnswerRe: CreateProcess ??? Pin
Rage14-Apr-03 6:08
professionalRage14-Apr-03 6:08 
GeneralRe: CreateProcess ??? Pin
will138314-Apr-03 6:27
will138314-Apr-03 6:27 
GeneralRe: CreateProcess ??? Pin
Rage14-Apr-03 6:43
professionalRage14-Apr-03 6:43 
GeneralRe: CreateProcess ??? Pin
Rage14-Apr-03 6:45
professionalRage14-Apr-03 6:45 
AnswerRe: CreateProcess ??? Pin
valikac14-Apr-03 7:41
valikac14-Apr-03 7:41 
GeneralI can´t understand why it doesn´t work Pin
Martin_Viet14-Apr-03 5:24
Martin_Viet14-Apr-03 5:24 
GeneralRe: I can´t understand why it doesn´t work Pin
Joaquín M López Muñoz14-Apr-03 5:30
Joaquín M López Muñoz14-Apr-03 5:30 
GeneralRe: I can´t understand why it doesn´t work Pin
Martin_Viet14-Apr-03 5:46
Martin_Viet14-Apr-03 5:46 
GeneralRe: I can´t understand why it doesn´t work Pin
Joaquín M López Muñoz14-Apr-03 6:17
Joaquín M López Muñoz14-Apr-03 6:17 
GeneralRe: I can´t understand why it doesn´t work Pin
Martin_Viet14-Apr-03 7:01
Martin_Viet14-Apr-03 7:01 
GeneralRe: I can´t understand why it doesn´t work Pin
Joaquín M López Muñoz14-Apr-03 7:24
Joaquín M López Muñoz14-Apr-03 7:24 
GeneralRe: I can´t understand why it doesn´t work Pin
Martin_Viet14-Apr-03 9:04
Martin_Viet14-Apr-03 9:04 
GeneralRe: I can´t understand why it doesn´t work Pin
Martin_Viet14-Apr-03 12:21
Martin_Viet14-Apr-03 12:21 
Generalpragma once Pin
ns14-Apr-03 5:15
ns14-Apr-03 5:15 
GeneralRe: pragma once Pin
User 988514-Apr-03 5:17
User 988514-Apr-03 5:17 
GeneralRe: pragma once Pin
Joaquín M López Muñoz14-Apr-03 5:22
Joaquín M López Muñoz14-Apr-03 5:22 
GeneralThanks! Pin
ns14-Apr-03 6:13
ns14-Apr-03 6:13 
GeneralRemote debugging a C++ app Pin
Navin14-Apr-03 5:05
Navin14-Apr-03 5:05 

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.