Whats the difference between static variables inside functions and static data members in classes?
I am new to C++ and currently reading Bjarne Stroustrups principle and practice using C++. In chapter 8.6.2 about why global variables are bad he gives the following example which can solve the problem of static initialization fiasco: