“std::map”: 使用类 模板 需要 模板 参数列表是什么我在vs2008中编写map关联容器出错, “std::map”: 使用类 模板 需要 模板 参数列表是怎么回事
[解决办法]
#include <iostream>
#include <map>
#include <string>
//using namespace std; 不想每个加std 接触注释
int main()
{
std::map<std::string ,int>word;
word["wangjian"] =1;
std::cout<<word["wangjian"]<<std::endl;
system("pause");
return 0;
};
[解决办法]
用尖括号而不是圆括号