I have the following map: myMap<string,vector<int>>. I now want to look through my map to see if a key exists and if it does, retrieve one of the int values from within that vector. What would be the best way to do this? Right now I have the following:
1 2 3 4 5 6 7 8 9 10 11 12 13
What would be the best way to look for a key and get one of the int values from its vector value? Right now I'm doing something like this:
[code]
map<string,vector<unsigned int>>::iterator it;
it = wordMap.find(someWord);
if(it == wordMap.end){
cout << "No matching entry";
}
else{
// this is where I'd want to access the value (the vector) of the map
}