【发布时间】:2017-01-03 01:48:31
【问题描述】:
我需要找到向量中小于某个值的最后一个元素。
与 find_first_of 类似,但不是第一个,而是最后一个。 我搜了一下,发现没有find_last_of但是有find_first_of。
为什么会这样?标准方法是将 find_first_of 与反向迭代器一起使用吗?
【问题讨论】:
-
是的,使用反向迭代器。
标签: c++ c++11 vector stl stl-algorithm