Click here to Skip to main content
16,008,010 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Formatting rebars Pin
wangyiming12-Apr-02 3:47
wangyiming12-Apr-02 3:47 
GeneralRe: Formatting rebars Pin
wangyiming12-Apr-02 3:50
wangyiming12-Apr-02 3:50 
Generalstatic in class Pin
NicholasCougar10-Apr-02 15:46
NicholasCougar10-Apr-02 15:46 
GeneralRe: static in class Pin
Christian Graus10-Apr-02 16:06
protectorChristian Graus10-Apr-02 16:06 
GeneralRe: static in class Pin
moliate10-Apr-02 20:44
moliate10-Apr-02 20:44 
GeneralRe: static in class Pin
James R. Twine12-Apr-02 10:17
James R. Twine12-Apr-02 10:17 
GeneralRe: static in class Pin
moliate12-Apr-02 12:52
moliate12-Apr-02 12:52 
GeneralRe: static in class Pin
James R. Twine12-Apr-02 20:15
James R. Twine12-Apr-02 20:15 
moliate wrote:
I am still a bit unclear about non-virtual member functions, however. I assume that they are not replicated in every object instance? Is there a separate pointer like the vtbl for them?

   IIRC, neither virtual or "normal" member functions are replicated for every instance of a object.  The old idea of "one copy of code, multiple copies of data" comes to mind.

   Yes, if the object contains virtual methods, then each instance of the object gets a copy of it's vtable.  This is needed for polymorphism.  But it is just the vtable that is in the memory layout of the object, not the code for the functions themselves.  That code still exists in one place, and the vtable is used to get to them.

moliate wrote:
Could you help me to become a better C++ programmer?

   That is what this site is (supposed to be) for!     :P

   (Note, I used "object" above instead of "class" because both classes and structs can contain member functions...)

   Peace!

-=- James.
GeneralVisual Studio .net offer Pin
CodeProjectSQ10-Apr-02 14:10
CodeProjectSQ10-Apr-02 14:10 
GeneralRe: Visual Studio .net offer Pin
CodeProjectSQ12-Apr-02 16:06
CodeProjectSQ12-Apr-02 16:06 
GeneralTab Contol on a dialog box Pin
10-Apr-02 13:07
suss10-Apr-02 13:07 
GeneralRe: Tab Contol on a dialog box Pin
Shog910-Apr-02 13:30
sitebuilderShog910-Apr-02 13:30 
Generalquick question on color Pin
jafrazee10-Apr-02 12:30
jafrazee10-Apr-02 12:30 
GeneralRe: quick question on color Pin
Shog910-Apr-02 12:43
sitebuilderShog910-Apr-02 12:43 
GeneralRe: quick question on color Pin
jafrazee10-Apr-02 14:00
jafrazee10-Apr-02 14:00 
GeneralRe: quick question on color Pin
Shog910-Apr-02 18:35
sitebuilderShog910-Apr-02 18:35 
GeneralRe: quick question on color Pin
jafrazee11-Apr-02 0:42
jafrazee11-Apr-02 0:42 
GeneralRe: quick question on color Pin
Jeremy Falcon10-Apr-02 13:46
professionalJeremy Falcon10-Apr-02 13:46 
GeneralConversion from Integers to Character String Pin
pjb78910-Apr-02 11:41
pjb78910-Apr-02 11:41 
GeneralRe: Conversion from Integers to Character String Pin
Joaquín M López Muñoz10-Apr-02 11:56
Joaquín M López Muñoz10-Apr-02 11:56 
GeneralFinding if an app is running, not using FindWindow Pin
Atlantys10-Apr-02 10:46
Atlantys10-Apr-02 10:46 
GeneralRe: Finding if an app is running, not using FindWindow Pin
Joaquín M López Muñoz10-Apr-02 10:49
Joaquín M López Muñoz10-Apr-02 10:49 
GeneralRe: Finding if an app is running, not using FindWindow Pin
Atlantys10-Apr-02 11:12
Atlantys10-Apr-02 11:12 
GeneralRe: Finding if an app is running, not using FindWindow Pin
Joaquín M López Muñoz10-Apr-02 11:49
Joaquín M López Muñoz10-Apr-02 11:49 
GeneralProgrammatically setting IE's homepage (how?) Pin
Oz Ben Eliezer10-Apr-02 10:36
Oz Ben Eliezer10-Apr-02 10:36 

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.