Click here to Skip to main content
15,924,038 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to paint the CTreeCtrl transparently? Pin
Shog99-May-05 9:59
sitebuilderShog99-May-05 9:59 
GeneralRe: How to paint the CTreeCtrl transparently? Pin
Martial Spirit9-May-05 12:55
Martial Spirit9-May-05 12:55 
GeneralDissasemble a dll and an exe Pin
sirtimid8-May-05 23:15
sirtimid8-May-05 23:15 
GeneralRe: Dissasemble a dll and an exe Pin
jmkhael8-May-05 23:28
jmkhael8-May-05 23:28 
GeneralWin32 ERROR Pin
Zalak Dedhia8-May-05 22:45
sussZalak Dedhia8-May-05 22:45 
GeneralRe: Win32 ERROR Pin
eli150219799-May-05 0:55
eli150219799-May-05 0:55 
GeneralRe: Win32 ERROR Pin
Zalak Dedhia9-May-05 1:06
sussZalak Dedhia9-May-05 1:06 
GeneralC++ Object HELL. Pin
vikramlinux8-May-05 22:40
vikramlinux8-May-05 22:40 
Hi Friends,
Please check following examples:
Example 1:
class Base1{
public:
int data0;
};

class Base2:public Base1{
public:
int data0;
};

class Derived: public Base2{
public:
int data0;
};

void main(void){
Derived D;
Base1 *bptr1= &D;
Base2 *bptr2=&D;
}


In above case :
Address of D=0x0012ff74;
Address of bptr1=0x0012ff74
Address of bptr2=0x0012ff74;

Now exmaple 2:

class Base1{
public:
int data0;
};

class Base2{
public:
int data0;
};

class Derived: public Base1,public Base2{
public:
int data0;
};

void main(void){
Derived D;
Base1 *bptr1= &D;
Base2 *bptr2=&D;
}

In above case :
Address of D=0x0012ff74;
Address of bptr1=0x0012ff74
Address of bptr2=0x0012ff78;


My question is why the base2 pointer has different address in above situation?
I have posted this long back but didn't get satisfied answer Frown | :( ..reposting...


VikramS
GeneralRe: C++ Object HELL. Pin
cmk8-May-05 23:09
cmk8-May-05 23:09 
GeneralRe: C++ Object HELL. Pin
vikramlinux8-May-05 23:29
vikramlinux8-May-05 23:29 
GeneralRe: C++ Object HELL. Pin
Tim Smith9-May-05 3:55
Tim Smith9-May-05 3:55 
GeneralRe: C++ Object HELL. Pin
vikramlinux9-May-05 18:31
vikramlinux9-May-05 18:31 
QuestionHow to get rid of "Log on to Windows" Dialog ,when computer is in a Domain? Pin
pubududilena8-May-05 22:29
pubududilena8-May-05 22:29 
AnswerRe: How to get rid of "Log on to Windows" Dialog ,when computer is in a Domain? Pin
David Crow9-May-05 2:10
David Crow9-May-05 2:10 
GeneralCObject::operator new() Pin
PJ Arends8-May-05 21:31
professionalPJ Arends8-May-05 21:31 
GeneralRe: CObject::operator new() Pin
Zdeslav Vojkovic8-May-05 22:34
Zdeslav Vojkovic8-May-05 22:34 
GeneralRe: CObject::operator new() Pin
PJ Arends9-May-05 7:09
professionalPJ Arends9-May-05 7:09 
Generalabout shutdown dialog box Pin
feitianli_38-May-05 21:25
feitianli_38-May-05 21:25 
GeneralRe: about shutdown dialog box Pin
P-Rex8-May-05 22:09
P-Rex8-May-05 22:09 
GeneralRe: about shutdown dialog box Pin
ThatsAlok8-May-05 22:20
ThatsAlok8-May-05 22:20 
GeneralRe: about shutdown dialog box Pin
feitianli_39-May-05 15:39
feitianli_39-May-05 15:39 
GeneralMemory leak.... vector of pointers.... Pin
franz19998-May-05 20:22
franz19998-May-05 20:22 
GeneralRe: Memory leak.... vector of pointers.... Pin
jmkhael8-May-05 23:37
jmkhael8-May-05 23:37 
Generaltell me a solution...if u can Pin
VCSharp0078-May-05 19:32
VCSharp0078-May-05 19:32 
GeneralRe: tell me a solution...if u can Pin
Christian Graus8-May-05 19:35
protectorChristian Graus8-May-05 19:35 

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.