why size of empty class object contains 1 byte in c++?
- prashant raj
- Mar 10, 2021
- 1 min read
Updated: May 2, 2021

Compiler allocate 1 byte of memory of empty class object for unique address identification. So, if a class have multiple objects they can have different unique memory location.
Means for differentiate the objects of empty class compiler allocate 1 byte of memory.
Comentarios