C++ - Eclipse CDT 编程问题
Eclipse CDT 编程问题
1. 缺少"#include<sstream>", 而使用istringstream会报错
错误: "error: variable ‘std::istringstream stream’ has initializer but incomplete type"
2. 使用unordered_map, 需要添加头文件"#include <tr1/unordered_map>",
使用方法: std::tr1::unordered_map<std::string, size_t> word_count({"hello", 1});
错误: "Symbol 'unordered_map' could not be resolved"
参考: http://stackoverflow.com/questions/13766364/cdt-indexer-cannot-find-stdunordered-map