Size of empty class with diamond problem | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Size of empty class with diamond problem

As far as k know, empty class must have size as 1 so that object do not refer to same memory location... Why empty class size is 2 in case of diamond problem...? refer below code to verify size of class as 2: https://code.sololearn.com/cGtKbwpeAw7L/?ref=app

5th Dec 2018, 5:31 AM
Ketan Lalcheta
Ketan Lalcheta - avatar
2 Answers
+ 1
5th Dec 2018, 5:59 AM
Ketan Lalcheta
Ketan Lalcheta - avatar