#include <iostream>
#include <map>
#include <string>
#include <list>

using namespace std;


int main()
{
    struct myStruct { string name2; int aCnt; std::list<string> theItems; };
    
    // Now I define a map
    std::map<string, myStruct> myMap;
    
    // Now I want to add items to myMap.
    myMap["ONE"] = {"TEN", 3, {"p1","p2","p3"}};  // But this doesn't seem to work
    
    // I know I could do something like
    myStruct myst;
    myst.name2 = "TEN";
    myst.aCnt = 3;
    myMap["ONE"] = myst;
    
    return EXIT_SUCCESS;
}