c++11 - How to initialize a nested map in constructor initialization list in c++ -


class test{    public:       test();    ...    private:       map<int, string> map1;       map<int, map<int, string>> map2; //two dimensional map    ... };  test::test():map1() {} 

i trying initialise map using initialization list. simple(single) map, can initialize call map constructor(map1()) in initialization list. how can initialize nested map(map2) in constructor initialization list.

thanks in advance help.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

javascript - How to bind ViewModel Store to View? -

javascript - Solution fails to pass one test with large inputs? -