mset2.cpp

mset2.cpp

#include ‹iostream.h›

#include ‹stl.h›

char* names[] = {"dave", "alf", "chas", "bob", "ed", "chas"};

int main() {

 typedef multiset‹char*, less_s› mset;

 mset s;

 s.insert(names, names + 6);

 for (mset::iterator i = s.begin(); i!= s.end(); i++) cout ‹‹ *i ‹‹ endl;

 return 0;

}