摘要: http://www.cplusplus.com/reference/algorithm/for_each/std::move()用于c++11http://www.cplusplus.com/reference/utility/move/c++98// for_each example#include // std::cout#include // std::for_each#include // std::vectorvoid myfunction (int i) { // function: std::cout myvector; myvector... 阅读全文
posted @ 2013-07-04 17:06 scott_h 阅读(394) 评论(0) 推荐(0) 编辑
摘要: template InputIterator find (InputIterator first, InputIterator last, const T& val){ while (first!=last) { if (*first==val) return first; ++first; } return last;}http://www.cplusplus.com/reference/algorithm/find/// find example#include // std::cout#include // std::find#include ... 阅读全文
posted @ 2013-07-04 16:55 scott_h 阅读(215) 评论(0) 推荐(0) 编辑