size of object in publically inherited class
View Single Post
I guess sizeof int is 2 on your system.
In derived3 you have derived3::l, derived1::j, derived2::k, derived1::base::i and derived2::base::i, which is five int's. Hence 10.
When you derive a class you get the whole lot, private or otherwise.