此程序使用一个迭代器来从stdin 中读取一行,同时另一个迭代器将该行分割成单个的标记。
This program uses an iterator to read a line from stdin and another iterator to split the line into individual tokens.
使用迭代器编写程序时,必须留意哪些操作会使迭代器失效。
When writing programs that use iterators, we must be aware of which operations can invalidate the iterators.
使用迭代器时,通常可以编写程序使得要求迭代器有效的代码范围相对较短。
When using iterators, it is usually possible to write the program so that the range of code over which an iterator must stay valid is relatively short.
使用迭代器时,通常可以编写程序使得要求迭代器有效的代码范围相对较短。
When using iterators, it is usually possible to write the program so that the range of code over which an iterator must stay valid is relatively short.
应用推荐