Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
Static Map Initialization
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="utab, post: 2558965"] 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 [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
Static Map Initialization
Top