#include <iostream>
#include <map>
using namespace std;
int main(){
typedef multimap<int, int> M;
typedef M::value_type v_t;
M m;
m.insert(v_t(1,100));
m.insert(v_t(1,200));
m.insert(v_t(2,300));
m.insert(v_t(3,400));
cout << "values of multimap 'm':";
M::iterator it = m.begin();
while (it != m.end()){
cout << it->first << "-" << it->second << endl;
it++;
}
cout << endl;
cout << "size of multimap = " << m.size() << endl;
cout << "multimap 'm' is " << (m.empty() ? "" : "not ") << "empty." << endl;
m.erase(m.begin(),m.end());
cout << "After m.erase(m.begin(), m.end())" << endl;
cout << "size of multimap = "<< m.size() << endl;
cout << "multimap 'm' is " << (m.empty() ? "" : "not ") << "empty." << endl;
return 0;
}