+ 1
Why the sizeof empty class is always 1?
sizeof empty class is 1 in c++
4 Respuestas
+ 4
Pointing to the class, compiler needs to know the right address and it just cannot be 0. It is the C++ standard about Classes. If u ask me deeply how the mechanism is working, unfortunately can't help you sir.
+ 3
size 0 is not allowed because of the memory adressing
+ 1
got it sir
tysm
0
can u please explain in detail?how it will happen?