c++ 无法通过 auto编译
g++ -std=c++11 test.cpp
find
template <class InputIterator, class T>InputIterator find (InputIterator first, InputIterator last, const T& val);Returns an iterator to the first element in the range [first,last) that compares equal to val. If no such element is found, the function returns last. http://www.cplusplus.com/reference/algorithm/find/
copy
template <class InputIterator, class OutputIterator>OutputIterator copy (InputIterator first, InputIterator last, OutputIterator result);Copies the elements in the range [first,last) into the range beginning at result. http://www.cplusplus.com/reference/algorithm/copy/
copy_backward
template <class BidirectionalIterator1, class BidirectionalIterator2>BidirectionalIterator2 copy_backward (BidirectionalIterator1 first, BidirectionalIterator1 last, BidirectionalIterator2 result);Bidirectional iterators to the initial and final positions in a sequence to be copied. The range used is [first,last), which contains all the elements between first and last, including the element pointed by first but not the element pointed by last. 从result指针的前一位开始,result指针前一位用last指针的前一位代替,result指针前2位用last指针的前2位代替. http://www.cplusplus.com/reference/algorithm/copy_backward/
新闻热点
疑难解答
图片精选