📄 transform.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head> <meta name="generator" content= "HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org"> <title>transform</title> <link href="../cppreference.css" rel="stylesheet" type="text/css"></head><body><table> <tr> <td> <div class="body-content"> <div class="header-box"> <a href="../index.html">cppreference.com</a> > <a href= "index.html">C++ Algorithms</a> > <a href= "transform.html">transform</a> </div> <div class="name-format"> transform </div> <div class="syntax-name-format"> Syntax: </div> <pre class="syntax-box"> #include <algorithm> iterator transform( iterator start, iterator end, iterator result, UnaryFunction f ); iterator transform( iterator start1, iterator end1, iterator start2, iterator result, BinaryFunction f );</pre> <p>The transform() algorithm applies the function <em>f</em> to some range of elements, storing the result of each application of the function in <em>result</em>.</p> <p>The first version of the function applies <em>f</em> to each element in [<em>start</em>,<em>end</em>) and assigns the first output of the function to <em>result</em>, the second output to (<em>result</em>+1), etc.</p> <p>The second version of the transform() works in a similar manner, except that it is given two ranges of elements and calls a binary function on a pair of elements.</p> <div class="related-name-format"> Related topics: </div> <div class="related-content"> <a href="copy.html">copy</a><br> <a href="fill.html">fill</a><br> <a href="generate.html">generate</a> </div> </div> </td> </tr> </table></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -