Click here to Skip to main content
16,011,374 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: dialog Pin
pnpfriend7-Nov-02 12:00
pnpfriend7-Nov-02 12:00 
GeneralRe: dialog Pin
Joaquín M López Muñoz7-Nov-02 12:05
Joaquín M López Muñoz7-Nov-02 12:05 
GeneralRe: dialog Pin
pnpfriend8-Nov-02 3:28
pnpfriend8-Nov-02 3:28 
GeneralC++ Help Needed Pin
Anonymous7-Nov-02 9:19
Anonymous7-Nov-02 9:19 
GeneralRe: C++ Help Needed Pin
Marc Clifton7-Nov-02 9:23
mvaMarc Clifton7-Nov-02 9:23 
QuestionMulti-View Single Doc example? Pin
Nick Jacobs7-Nov-02 9:10
Nick Jacobs7-Nov-02 9:10 
GeneralSAPI Pin
Anonymous7-Nov-02 9:14
Anonymous7-Nov-02 9:14 
Generalvirtual function confusion VTABLE Pin
ns7-Nov-02 8:47
ns7-Nov-02 8:47 
I'm puzzled: FuelGauge is a CIndicator object.

I had:

class CIndicator  
{
private:
	double   mMaxLimit;
	double   mCurValue;
  double   mMinLimit;
public:
	         CIndicator(double MaxLimit   = 100.0,
                      double startValue = 0.0,
                      double MinLimit   = 0.0);
	        ~CIndicator();
           CIndicator (const CIndicator& ind);
	 void    Display   (CString s) const;
	double   SetValue  (double value);
  double   GetValue  () const;
	BOOL     IncreaseBy(double value = 1.0);
	BOOL     DecreaseBy(double value = 1.0);
};


sizeof( FuelGauge) turns out to be 24.


When I added a virtual in front of the function Display(), I got sizeof = 32! Its due to the Vtable I understand, but how do I find out the size of the address of the VTable? Do all addresses have the same size? Its looks like its 8, but why is that? Does the address size depend on the kind of object thats being stored there? If so, what kind of object is the VTable object?

Appreciate your help,
ns
GeneralRe: virtual function confusion VTABLE Pin
Tim Smith7-Nov-02 8:51
Tim Smith7-Nov-02 8:51 
GeneralRe: virtual function confusion VTABLE Pin
ns7-Nov-02 8:59
ns7-Nov-02 8:59 
GeneralRe: virtual function confusion VTABLE Pin
Tim Smith7-Nov-02 10:03
Tim Smith7-Nov-02 10:03 
GeneralRe: virtual function confusion VTABLE Pin
Joaquín M López Muñoz7-Nov-02 8:48
Joaquín M López Muñoz7-Nov-02 8:48 
GeneralRe: virtual function confusion VTABLE Pin
ns7-Nov-02 9:02
ns7-Nov-02 9:02 
GeneralRe: virtual function confusion VTABLE Pin
Joaquín M López Muñoz7-Nov-02 9:04
Joaquín M López Muñoz7-Nov-02 9:04 
GeneralThank you! Pin
ns7-Nov-02 9:12
ns7-Nov-02 9:12 
GeneralToolbar tooltip question Pin
Stevenpph7-Nov-02 8:41
Stevenpph7-Nov-02 8:41 
GeneralRe: Toolbar tooltip question Pin
Joaquín M López Muñoz7-Nov-02 9:28
Joaquín M López Muñoz7-Nov-02 9:28 
GeneralRe: Toolbar tooltip question Pin
Stevenpph7-Nov-02 10:06
Stevenpph7-Nov-02 10:06 
GeneralRe: Toolbar tooltip question Pin
Joaquín M López Muñoz7-Nov-02 10:11
Joaquín M López Muñoz7-Nov-02 10:11 
GeneralDynamic Prop. Sheet Pin
john john mackey7-Nov-02 8:31
john john mackey7-Nov-02 8:31 
GeneralRe: Dynamic Prop. Sheet Pin
Joaquín M López Muñoz7-Nov-02 8:44
Joaquín M López Muñoz7-Nov-02 8:44 
GeneralRe: Dynamic Prop. Sheet Pin
Joan M7-Nov-02 8:52
professionalJoan M7-Nov-02 8:52 
GeneralLock xadd Pin
José Luis Sogorb7-Nov-02 6:57
José Luis Sogorb7-Nov-02 6:57 
GeneralRe: Lock xadd Pin
Daniel Turini7-Nov-02 7:07
Daniel Turini7-Nov-02 7:07 
QuestionCRichEditCtrl printng... What's wrong with my code? Pin
Nasty_p7-Nov-02 5:04
Nasty_p7-Nov-02 5: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.