读书人

C++ - Eclipse CDT 编程有关问题

发布时间: 2013-11-03 15:39:14 作者: rapoo

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

C++ - Eclipse CDT 编程有关问题

读书人网 >编程

热点推荐