I am stuck on trying to figure out how to insert a vector for a value in a map. For example:
#include <iostream> #include <vector> #include <map> using namespace std; int main() { map <int, vector<int> > mymap; mymap.insert(pair<int, vector<int> > (10, #put something here#)); return 0; } I don't know what syntax to use insert a vector for value. I tried {1,2}, but that failed. What syntax should I use?
Everything works if I declare a vector in advance and give it a name, but I don't want to do that, as I want to have a map with a lot of vectors.
Thank You in Advance