Learn C++ Programming Language
This project is maintained by cugwhp
输入:文本文件(多行)
输出:某个单词出现在文本文件中的行号(可以是多个)
过程描述:1)读取文本文件;2)输入某个单词,查询某个单词出现的行号,依次输出
提示:
```c++
#include <algorithm>
#include <numeric>
```
提示:使用find_first_of函数。
- fill
- fill_n
- back_inserter
- copy
_ replace
_ replace_copy
提示:1. 用容器存放单词;2.用到的函数 sort, unique, stable_sort, count_if
思考:能否想出2种不同的实现途径。
提示:词典文件 [dictionary](/OOPCPP/Exercise/dictionary.txt)