1. Does the member function occupy storage space?
member functions do not occupy the storage space, only when called, go to the function entry address, call the Change function in return,
member functions are the same as normal functions
The dynamic memory allocation caused by the instantiation of an object only includes the space required for non-static member variables and virtual table pointers (if there are virtual functions)
member functions are placed in the code area and shared by multiple objects.
From a compilation perspective, member functions are no different from normal functions.
Only the parameters are modified by the C + + compiler, and the first argument is always this
2. A member function in a class is a function in a shared code snippet and does not occupy memory space;
3. The member functions defined in the class default to inline (inline), which are expanded at the call, so multiple copies of the function may exist in a program (except for functions declared outside the class in the Class), refer to C++primer