class a {
public:
typedef std::map<int, int> urlMap;
static urlMap mp;
static urlMap CreateMap() {
urlMap tmp_map = { {1, 1},{2, 2},{3, 3} };
return tmp_map;
}

};
a::urlMap a::mp = a::CreateMap();

int main()
{
std::map<int, int>::iterator it = a::mp.begin();
while (it != a::mp.end())
{
cout << it->first << " "<< it->second <<endl;
it++;
}
return 0;
}


C++静态成员变量map如何初始化赋值_class