using namespace std;
class MyClass {
private:
map<string,int> g_mymap;
};
and in MyClass.cpp
map<string,int> MyClass::g_mymap;
-----------------------------------------------
How do I populate g_mymap with values that never change from run to run?
I thought about checking in the constructor of MyClass to see if g_mymap is empty before populating it, but this wouldn't be sufficient if I have static member functions which use g_mymap (ie static member functions may be called without any constructors ever being called).