B
Bill Sun
Hi,
I have a question about to initialize a static map member like this:
In the mapclass.h;
class mapclass
{
private:
static map<string, int> s_mapArray;
}
In the mapclass.cpp;
.....
s_mapArray["Item01"] = 0;
s_mapArray["Item02"] = 1;
.....
I don't want to initialize this static member in a member function body, I only want to initialize it in the cpp file body.
What I can do ?
Thanks advanced,
Bill
I have a question about to initialize a static map member like this:
In the mapclass.h;
class mapclass
{
private:
static map<string, int> s_mapArray;
}
In the mapclass.cpp;
.....
s_mapArray["Item01"] = 0;
s_mapArray["Item02"] = 1;
.....
I don't want to initialize this static member in a member function body, I only want to initialize it in the cpp file body.
What I can do ?
Thanks advanced,
Bill