The size of the basic concepts of re-recognizing the class on June 3
~ The book says: A class size is all of its members. In theory, "class" data type itself does not account for storage space, such as: Extern Int a; // Single variable declaration class a {// only has a statement of class A of a integer variable. INT A;}; then tested: SizeOf (a) and sizeof (a) will find out 4. I am thinking, how much is the size of an empty class? Class Empty_a {}; if SIZEOF (A) - SIZEOF (A) = 0 is used to use the simple addition and subtraction of the above. BUT IN FACT, the actual result of the actual operation in the compilation environment of VC6.0 is 1. Understand in "Thinking In C ": "In the earlier version of this language (C ), this length is zero, but when you create such an object: they have a clumsy situation: they have followed them The object has the same address, no difference. In this way, the structure of the member should always have the smallest non-zero length. "Explain the last sentence," no number of members "means that there may be member functions. As in the above example, Class Empty_a {void function1 (); void function2 (int a) {cout << a << endl;};}; no effect on the results. This is because the class defined in the class is actually only declares that the code defined by the function is the defined code of the class - this is also a lot of books, it is recommended to define the members of the class in the class. s reason. "Minimum non-zero length", in VC6.0, CHAR has the smallest non-zero length, 1.