#include <iostream>
#include <string>
#include <unordered_map>
using namespace std;
int main()
{
unordered_map< int, string > m;
m[1] = "one";
m[2] = "two";
m[4] = "four";
m[3] = "three";
m[2] = "TWO!";
cout << m[2] << endl;
m.clear();
return 0;
}
我正在学习,无法弄清楚。编译器抛出类型unordered_map
未声明的错误。
我正在使用 Visual C++ 2008 速成版。