9.12.                                                    275

9.12.  

     -  
.

 

  '     

  2     

     )

       bind2nd  -
      
.

  stl_adap.cpp

//   bind2nd

^include <iostream>
^include <algorithm>
^include <functional>

include <string>
using namespace std;

template <class Forwlter>
void print(Forwiter first, Forwiter last,

const char* title)
{

cout  title  endl;

while ( first != last)

cout  *first++  '\t';

cout  endl ;

i

int main()
{

int data[3] = { 9, 10, 11};

print(data, data + 3, " ");

transform(data, data + 3, data,

bind2nd(times<int>(), 2));

print(data, data + 3, " ");

}

     .4.1,  ,  . 436.

'       . .
1       . .
''          -.
. .