Listing 2: A program that generates error messages involving iterators
// // error2.cpp: A simple multiset error // #include <iostream> #include <set> #include <string> int main() { using namespace std; int vals[] = { 10, 20, 30, 40}; multiset<string> mm; mm.insert(vals, vals + 3); return 0; } End of Listing