hash_map and C++ strings

  • Thread starter Thread starter Jon Cosby
  • Start date Start date
J

Jon Cosby

Please help me with this. Does VC's hash_map support C++ strings? If so, why
does the following

hash_map <int, string> hm2;
typedef pair <int, string> pr2;
hm2.insert(pr2(1, "Hello"));
cout << "First key value is " << hm2[1] << endl;

crash at run-time?

--


Jon Cosby

Please do not reply to this email address.
 
Back
Top