正在加载图片...
Iterators(cont.) Now we rewrite findo to meet request 4 template <typename IteratorType, typename ElemType> IteratorType find (IteratorType first, Iterator Type last, const ElemType& value) for first != last; first++) if ( first = Value) return first return last;Iterators (cont.) ◼ Now we rewrite find() to meet request 4 template <typename IteratorType, typename ElemType> IteratorType find(IteratorType first , IteratorType last , const ElemType& Value) { for (; first != last; first++) { if (*first == Value) return first; } return last; }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有