Simple.If its a single class,just count the no of bytes required for the variables alone.Avoid the functions.
Now,if the class is inherited,regardless of the scope used in inheritace(pri or P or pub) add all the bytes in the main classes to the size of the subclass(You need to add private members also,since in inheritance,private members are inherited,its just that none of the base classes have access privilages to it.It may be confusig,but its given in the text.)
cheers!
Simple.If its a single class,just count the no of bytes required for the variables alone.Avoid the functions.
Now,if the class is inherited,regardless of the scope used in inheritace(pri or P or pub) add all the bytes in the main classes to the size of the subclass(You need to add private members also,since in inheritance,private members are inherited,its just that none of the base classes have access privilages to it.It may be confusig,but its given in the text.)
cheers!