• Kursy
  • Kompilator kodu
  • Dyskusja
  • Cennik
  • Zespoły
Menu
+ 6

Why with virtual inheritance size more? I. 've thought it on the contrary.

Example code here, class D has virtual inheritance, C not. Sizeof C=16, I understand, but sizeof D 20, why? https://code.sololearn.com/chyDp6YY77lj/?ref=app

c++inheritancevirtual
18th May 2017, 3:27 PM
shaldem
shaldem - avatar
1 Odpowiedź

Często masz takie pytania?

Ucz się bardziej efektywnie, za darmo:

  • Wprowadzenie do Pythona

    7.1M uczących się

  • Wprowadzenie do Java

    4.7M uczących się

  • Wprowadzenie do C

    1.5M uczących się

  • Wprowadzenie do HTML

    7.5M uczących się

Zobacz wszystkie kursy
Popularne dzisiaj
Audio adding
1 Votes
playground input
0 Votes
What is problem in this code
0 Votes
Stuck in Quize
1 Votes
C Program
0 Votes
This Program Does Something Weird. Can You Explain Why?
1 Votes
Software developer
0 Votes
Asking for final year project ideas!
1 Votes
How does JavaScript's event loop handle asynchronous operations like setTimeout, Promises, and async/await, and what are the dif
1 Votes
есть кто на русском разговаривает?
0 Votes