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

vb.net - How to ignore if a cell is empty nothing -

Sort a complex associative array in PHP -

recursion - Can every recursive algorithm be improved with dynamic programming? -