Class X
{
}
Class Y
{
char c;
}
class Z
{
int i;
}
Now:
sizeof(X) // == 1
sizeof(Y) // == 1
sizeof(Z) // == 4
Why is the size of class X is 1 when it is empty ?
I understand that sizeof(Y) & sizeof(Z) to be 1 and 4 because of the member variables.
Can someone enlighten me on this.
