Static member functions in C + + are part of the entire class, not an object, so you do not need to create objects to access
1. Function definitions that appear outside the class body cannot specify the keyword static;
2. Static members can access each other, including static member functions to access static data members and access static member functions;
3. Static member functions and static data members can be accessed arbitrarily by non-static member functions;
4. Static member functions cannot access non-static member functions and non-static data members;
5. Because there is no additional overhead for this pointer, the static member function has a slight increase in speed compared to the global function of the class;
6. Call the static member function, which can be accessed with the member access operator (.) and (a) call a static member function for an object of a class or a pointer to a class object.
When all objects of the same class use a quantity, for this common amount, a static data member variable can be used, which takes the same value for all objects of the same class. Static member variables can only be called by static member functions. Static member functions are also shared by all objects in the same class. Only static member variables and static member functions can be called.
C + +-static member functions