Friday, December 3, 2010

Class Size

class IAC : public IA {public: int i;}; is 8 bytes on Solaris.

An object of type IAC has two integers in it; one from IA, and one from IAC. If you had an object iac of type IAC, you can access the integer in the IA subcomponent with this: iac.IA::i;

No comments:

Post a Comment