You also need to put in something to take care of that static data member:
Finding out the size should be a simple matter of using the sizeof operator:Code:int X::sa;
Code:cout << "Size of X is: " << sizeof(X) << endl; cout << "Size of Y is: " << sizeof(Y) << endl;