Ext: https://zhidao.baidu.com/question/519474836.html
Class Clock
{
Public
.........
Private
int hour;
int minute;
int second;
};
Member variables, Hour,minute,second for the clock class, whether the above variables can be understood as global variables.
Answer: You can not understand this, yo, global variables are public, who can be modified, and instantiated, the member variables of the class can only be owned by the instantiated object. For example, your family is a class, and everyone in your home can be understood as an instantiated object of a class, for example, your hand is a member variable, and this is a member variable that only you can control and other instantiated objects cannot use.
Note: It is not good to understand the overall situation, because the member variable is a part of the instantiated object, the equivalent of the object's component, the object does not die, the variable will not die.