static data members and member functions
static int static_member;
Each instance of the class xx has its own copy of the normalmember1 and normalmember2 variable, but there is only one copy of the static_member variable shared by all instances.
Two important applications of static data members:
- because all instances of a class “see” the same data member, you can use it to globally modify the behavior of all instances of the class;
- a static variable can be set even if no instance of a class exists yet.