Click here to Skip to main content
15,887,214 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionEmbedding Python in C++ Pin
VISWESWARAN199824-Dec-16 1:14
professionalVISWESWARAN199824-Dec-16 1:14 
AnswerRe: Embedding Python in C++ Pin
Afzaal Ahmad Zeeshan24-Dec-16 2:54
professionalAfzaal Ahmad Zeeshan24-Dec-16 2:54 
PraiseRe: Embedding Python in C++ Pin
VISWESWARAN199824-Dec-16 3:15
professionalVISWESWARAN199824-Dec-16 3:15 
GeneralClass and Object memory layout question Pin
samzcs21-Dec-16 4:24
samzcs21-Dec-16 4:24 
GeneralRe: Class and Object memory layout question Pin
Richard MacCutchan21-Dec-16 4:44
mveRichard MacCutchan21-Dec-16 4:44 
GeneralRe: Class and Object memory layout question Pin
samzcs21-Dec-16 5:37
samzcs21-Dec-16 5:37 
GeneralRe: Class and Object memory layout question Pin
Richard MacCutchan21-Dec-16 5:58
mveRichard MacCutchan21-Dec-16 5:58 
GeneralRe: Class and Object memory layout question Pin
samzcs21-Dec-16 6:23
samzcs21-Dec-16 6:23 
Thank you for your reply.

I am a little confused about the inheritance, member function inheritance.
So the member function of one class, only has one copy in the memory map, then if class B's base class is class A,
the inheritance mechanism makes the B's object has member variables of class A.
and B's object inherited the member functions of class A,while B's object don't have those functions, B's object just know how to invoke those functions, right?

And the member function inheritance follow same inheritance rule as member variables, for example, private inheritance will make all member functions inherited from base class A, turn to private in class B.

class A {
public: void f1(){}
protected: int f2() {}
private: char f3() {}
};

class B:private A {
// B inherit f1(), f2(), f3(), and access for all 3 functions will be private.
};

Thanks
}
GeneralRe: Class and Object memory layout question Pin
Richard MacCutchan21-Dec-16 6:46
mveRichard MacCutchan21-Dec-16 6:46 
GeneralRe: Class and Object memory layout question Pin
samzcs21-Dec-16 7:26
samzcs21-Dec-16 7:26 
GeneralRe: Class and Object memory layout question Pin
leon de boer21-Dec-16 14:50
leon de boer21-Dec-16 14:50 
GeneralRe: Class and Object memory layout question Pin
CPallini21-Dec-16 9:14
mveCPallini21-Dec-16 9:14 
GeneralRe: Class and Object memory layout question Pin
«_Superman_»1-Jan-17 22:42
professional«_Superman_»1-Jan-17 22:42 
QuestionC2084 FUNCTION ALREADY HAS A BODY Pin
ForNow18-Dec-16 13:08
ForNow18-Dec-16 13:08 
AnswerRe: C2084 FUNCTION ALREADY HAS A BODY Pin
Albert Holguin18-Dec-16 15:26
professionalAlbert Holguin18-Dec-16 15:26 
GeneralRe: C2084 FUNCTION ALREADY HAS A BODY Pin
ForNow18-Dec-16 15:52
ForNow18-Dec-16 15:52 
AnswerRe: C2084 FUNCTION ALREADY HAS A BODY Pin
Albert Holguin18-Dec-16 15:59
professionalAlbert Holguin18-Dec-16 15:59 
GeneralRe: C2084 FUNCTION ALREADY HAS A BODY Pin
ForNow18-Dec-16 16:18
ForNow18-Dec-16 16:18 
GeneralRe: C2084 FUNCTION ALREADY HAS A BODY Pin
Albert Holguin18-Dec-16 16:28
professionalAlbert Holguin18-Dec-16 16:28 
GeneralRe: C2084 FUNCTION ALREADY HAS A BODY Pin
ForNow18-Dec-16 16:34
ForNow18-Dec-16 16:34 
GeneralRe: C2084 FUNCTION ALREADY HAS A BODY Pin
Albert Holguin18-Dec-16 17:02
professionalAlbert Holguin18-Dec-16 17:02 
GeneralRe: C2084 FUNCTION ALREADY HAS A BODY Pin
leon de boer18-Dec-16 16:31
leon de boer18-Dec-16 16:31 
AnswerRe: C2084 FUNCTION ALREADY HAS A BODY Pin
Richard MacCutchan18-Dec-16 21:48
mveRichard MacCutchan18-Dec-16 21:48 
GeneralRe: C2084 FUNCTION ALREADY HAS A BODY Pin
Peter_in_278018-Dec-16 23:09
professionalPeter_in_278018-Dec-16 23:09 
GeneralRe: C2084 FUNCTION ALREADY HAS A BODY Pin
Richard MacCutchan19-Dec-16 5:38
mveRichard MacCutchan19-Dec-16 5:38 

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.