#include <iostream>
#include <map>
#include <vector>
#include <algorithm>

int main() {
	using mymap = std::map<int,int>;
	
	mymap m1 { { 1,1 }, { 2,2 }, {3,3} };
	mymap m2 { { 2,2 }, {4,4} };
	
	std::vector<mymap::value_type> diffs;
	std::set_difference( m1.begin(), m1.end(), m2.begin(), m2.end(),
	                     std::back_inserter(diffs),
	                     m1.value_comp() );
	for( auto p : diffs )	                     
	   std::cout << p.first << "-" << p.second << std::endl;
	return 0;
}