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 -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -