I was wondering what could be the size of an object of an empty class. It surely could not be 0 bytes since it should be possible to reference and
Even though its not required to assign any memory for an empty class, but in order to make objects of empty classes, compiler assigns the minimum memory that can be assigned, which is 1 byte. This way compiler can distinguish two objects of the same empty class uniquely, and will able to assign the address of the object to a pointer of the empty class type.