STL: transform

transform

Applies a specified function object to each element in a source range or to a pair of elements from two source ranges and copies the return values of the function object into a destination range.

template<class InputIterator, class OutputIterator, class UnaryFunction> 
   OutputIterator transform( 
      InputIterator _First1,  
      InputIterator _Last1,  
      OutputIterator _Result, 
      UnaryFunction _Func 
   ); 
template<class InputIterator1, class InputIterator2, class OutputIterator, 
   class BinaryFunction> 
   OutputIterator transform( 
      InputIterator1 _First1,  
      InputIterator1 _Last1, 
      InputIterator2 _First2,  
      OutputIterator _Result, 
      BinaryFunction _Func 
   );

 

posted @ 2013-03-11 11:23  freewater  阅读(330)  评论(0编辑  收藏  举报