I have a container of std::map<string,std::map<string,int>>.
-
How do I insert data into such a container? Do I have to have an inner map as additional variable or not? The code should compile under both MSVC 2010 and XCode 4.2 (Snow Leopard).
-
Is XCode 4.2 under Snow Leopard (10.6) supports such a container?
Just use the overloaded
[]operator and you are done:and yes, Xcode 4.2 supports them, I personally used them under OSX with no problems.