Im having problems inserting a map into a map, I cant manage to access the actual element and call insert() on it.
Thank you
Code:#include <map> using namespace std; int main() { map<int, multimap<int, int> > my_map; map<int, multimap<int, int> >::iterator my_it; pair<map<int, multimap<int, int> >::iterator, bool> func_pair; my_it = my_map.find(42); if(my_it == my_map.end()) { func_pair = my_map.insert(make_pair(42, multimap<int, int>())); (func_pair.first)->insert(make_pair(42, 42)); } else { // } return 0; }



LinkBack URL
About LinkBacks


