Object-oriented scope
Scope
Scope keyword
Public:public indicates that the data member and member function are open to all users, and all users can call them directly.
Protected:protected is public for children and friends, and it can be used freely without any restrictions, while for other external class,protected, it becomes private.
Private:private means private, private means that no one can use it directly except class himself, private property is sacred and inviolable, even children and friends can not use it.