V
vijay
I have a doubt with size of classed with virtual functions
I have declared A,A1,A2 ,B , C, D some classes with no varaibles but a
vitual function each,
The size of A is as expected 4 bytes with one vtbl ptr
BUt when I derive the class B from class A (both have 1 virtual function
each ) the size remains still as 4 bytes .
class A = 4 bytes
class B ublic A = 4 bytes
class Cublic A,public A1 size = 8 Bytes
class D ublic A,public A1,public A2 size = 12 bytes
Can some body explain this anamlous behavior
Thanks
Vijay
I have declared A,A1,A2 ,B , C, D some classes with no varaibles but a
vitual function each,
The size of A is as expected 4 bytes with one vtbl ptr
BUt when I derive the class B from class A (both have 1 virtual function
each ) the size remains still as 4 bytes .
class A = 4 bytes
class B ublic A = 4 bytes
class Cublic A,public A1 size = 8 Bytes
class D ublic A,public A1,public A2 size = 12 bytes
Can some body explain this anamlous behavior
Thanks
Vijay