You have a type issue here.

- itNew is an iterator to a pair<int, MapOfInts>.
- myMap IS a MapOfInts.

What exactly do you want "mymap.insert(itNew);" to do?