#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 Express Edition。