The static keyword has at least N functions:
(1) The static variable in the function body applies to this function body. Unlike the auto variable, the memory of this variable is allocated only once, therefore, the value remains the value of the previous time during the next call;
(2) The static global variables in the module can be accessed by the functions used in the module, but cannot be accessed by other functions outside the module;
(3) The static function in the module can only be called by other functions in the module. The scope of use of this function is limited to the module that declares it;
(4) static member variables in the class belong to the entire class and only one copy of all objects in the class;
(5) The static member function in the class belongs to the whole class. This function does not receive the this pointer, so it can only be a static member variable of the category.
The const keyword has at least N functions:
(1) to prevent a variable from being changed, you can use the const keyword. When defining the const variable, you usually need to initialize it, because there will be no chance to change it in the future;
(2) For pointers, you can specify the pointer itself as const, or you can specify the data referred to by the pointer As const, or both of them as const;
(3) In a function declaration, const can modify the form parameter, indicating that it is an input parameter and cannot change its value within the function;
(4) If the member function of the class is specified as the const type, it indicates that it is a constant function and the member variables of the class cannot be modified;
(5) For a member function of the class, you must specify its return value as the const type so that its return value is not the "Left value ".
Const static extern inline volatile explicit