I read somewhere that non-virtual non-static member functions do not add to the size of a class object, but can someone tell me where they are stored in memory. Static members functions, which also do not add to the size of a class object, are stored in static data segment, correct?

I was also looking into how virtual inheritance affects size of a subclass, and ran into the following link.
http://www.cprogramming.com/tutorial...ss_object.html

This cites the following example that I do not think is correct. Why is the size of Bbase 12- should not it be 8 (4 bytes for iMem (overrides base class imem) and one vptr)?
Also, should not sizeof (ABCDerived) be 20 (if iMem do not override then 16 bytes for iMem and 4 for vptr)?

---
class ABase{
int iMem;
};

class BBase : public virtual ABase {
int iMem;
};

class CBase : public virtual ABase {
int iMem;
};

class ABCDerived : public BBase, public CBase {
int iMem;
};

And if you check the size of these classes, it will be:

* Size of ABase : 4
* Size of BBase : 12
* Size of CBase : 12
* Size of ABCDerived : 24
--