cout << "The string that not euqal with \"pooth\" : " << endl;
sIter = sVec.begin();
string sToCompare = "pooth";
while ((sIter = find_if(sIter, sVec.end(), bind2nd(not_equal_to
{
cout << *sIter << " ";
++sIter;
}
cout << endl << endl;
vector
cout << "The original val: " << endl;
for_each(nVec.begin(), nVec.end(), PrintVal());
cout << endl;
transform(nVec.begin(), nVec.end(), nVec.begin(), bind2nd(multiplies
cout << "After multiply by 2: " << endl;
for_each(nVec.begin(), nVec.end(), PrintVal());
cout << endl;
return 0;
}
摘自 huagong_adu