When do function-level static variables get allocated/initialized?
I was curious about this so I wrote the following test program and compiled it with g++ version 4.1.2. include <iostream> #include <string> using namespace std; class test { public: test(const char *name) : _name(name) { cout << _name << ” created” << endl; } ~test() { cout << _name << ” destroyed” << endl; … Read more