set容器
来源:互联网 发布:mac itunes 照片 删除 编辑:程序博客网 时间:2024/06/05 11:29
使用set和map容器,可以很容易地实现一个单词统计程序,这个程序只统计那些不在排除集中的单词
void restricted_wc(ifstream &remove_file, map<string, int> &word_count){ set<string> excluded; // set to hold word we'll ignore string remove_word; while(remove_file >> remove_word) excluded.insert(remove_word); string word; while(cin >> word) // increment counter only if the word is not in excluded if(! excluded.count(word)) ++word_count[word];来自C++ Primer
- set容器
- set容器
- set容器
- 容器set
- set容器
- 容器set
- set 容器
- Set容器
- 容器Set
- set容器
- set 容器
- set容器
- set容器
- set容器
- set容器
- set容器
- set 容器
- set容器
- jquery Math
- [iTyran翻译]OpenGL ES 从零开始系列9a:动画基础和关键帧动画
- 【NIO】2. Selector
- apt-get
- 控制每一列的宽度
- set容器
- TechExcel CustomerWise 9.2新功能介绍
- <jsp:forward.../> 里跳转 xxx.action
- Redis与Memcached的比较
- R语言:实现文本分析实例(基础篇)
- SATA接口
- [iTyran翻译]OpenGL ES 从零开始系列9(完结):四元数
- 穷富判定12条标准 三法则轻松做富人
- 各种团购API