So I've created
map<string, vector<int>> mylist;
but I'm having trouble adding items to it. I tried creating a vector and then inserting a string and the vector in the map, but visual studio is giving me an error on the line with the insert function (It says no instance of overloaded function matches the argument list). This is what I'm doing:
vector<int> variable_list(some_integer);
mylist.insert(string_variable, variable_list);
How should I be adding the vector to the map? Can I create the vector in the insert function somehow?
Also, I'll be initializing the vector with one int, but then I'll want to go back and add more later. How do I access a vector within a map?
Thanks for your help.