U
utab
Dear all,
I am wondering whether there is a way to initialize map statically;
lets say I have
map<string, vector<string> > m;
I can initialize this way,
m["key1"].push_back(value1)
m["key1"].push_back(value2)
m["key2"].push_back(value1
m["key2"].push_back(value2)
..
..
..
Is there a way like in python(I guess most of you are familiar with
tables and dictionaries)
for example: for the above map
m=[(key1 value1), (key1 value2), (key2 value1), (key2 value2) ..... ]
// This is not existent in
// C++, I know but I think
// you got what I meant.
Regards
I am wondering whether there is a way to initialize map statically;
lets say I have
map<string, vector<string> > m;
I can initialize this way,
m["key1"].push_back(value1)
m["key1"].push_back(value2)
m["key2"].push_back(value1
m["key2"].push_back(value2)
..
..
..
Is there a way like in python(I guess most of you are familiar with
tables and dictionaries)
for example: for the above map
m=[(key1 value1), (key1 value2), (key2 value1), (key2 value2) ..... ]
// This is not existent in
// C++, I know but I think
// you got what I meant.
Regards