tag:blogger.com,1999:blog-3172846251286257570.post1758657343332573737..comments2023-03-18T17:55:56.297+02:00Comments on stupefy developer: c++: virtual inheritanceNi@mhttp://www.blogger.com/profile/08597984409156766747noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-3172846251286257570.post-40182845576534366152011-03-28T11:48:40.950+03:002011-03-28T11:48:40.950+03:00Hi, priyanka.
Yes, this is due to the presence of...Hi, priyanka.<br /><br />Yes, this is due to the presence of virtual table. <br /><br />class B now contains pointer to vtable.Ni@mhttps://www.blogger.com/profile/08597984409156766747noreply@blogger.comtag:blogger.com,1999:blog-3172846251286257570.post-84999258366406913732011-03-24T10:21:20.060+02:002011-03-24T10:21:20.060+02:00I have a question related to this post.
Size of an...I have a question related to this post.<br />Size of an empty derived class, that has a virtual base class comes out to be 4. why? Does virtual inheritance creates a virtual table?.<br />class A {};<br />class B: public virtual A {}<br /><br />sizeof class b is 4.Unknownhttps://www.blogger.com/profile/09234990685806815113noreply@blogger.comtag:blogger.com,1999:blog-3172846251286257570.post-36910768050567324952009-07-20T18:08:38.915+03:002009-07-20T18:08:38.915+03:00You are welcome!
I'm glad you found out this i...You are welcome!<br />I'm glad you found out this interesting!Ni@mhttps://www.blogger.com/profile/08597984409156766747noreply@blogger.comtag:blogger.com,1999:blog-3172846251286257570.post-43132344622969600082009-07-20T10:27:25.248+03:002009-07-20T10:27:25.248+03:00thank you for explanation, very helpfull.thank you for explanation, very helpfull.Anonymoushttps://www.blogger.com/profile/11119298494545706507noreply@blogger.com