#include <iostream>
#include <map>
#include <iomanip>
#include <string>
using namespace std;
template<class T>
class ID{
private:
T Id, name;
public:
ID(T t, T n) :Id(t), name(n){}
void print(){
cout.setf(ios::left);
cout << setw(15) << name << " " << Id << endl;
cout.unsetf(ios::left);
}
};
int main(){
typedef ID<string> Id;
typedef multimap<int, Id> M;
typedef M::value_type v_t;
M m;
m.insert(v_t(1,Id("000123","Shevchenko")));
m.insert(v_t(2,Id("000124","Pushkin")));
m.insert(v_t(3,Id("000125","Shakesperae")));
m.insert(v_t(3,Id("000126","Smith")));
cout << "size of multimap 'm' = " << m.size() << endl;
M::iterator it = m.begin();
while (it != m.end()){
cout.setf(ios::left);
cout << setw(3) << it->first;
it->second.print();
it++;
}
return 0;
}