bind2nd1.cpp
bind2nd1.cpp
#include ‹iostream.h›
#include ‹stl.h›
int array[3] = {1, 2, 3};
int main() {
replace_if(array, array + 3, binder2nd‹greater‹int› ›(greater‹int›(), 2), 4);
for (int i = 0; i ‹ 3; i++) cout ‹‹ array[i] ‹‹ endl;
return 0;
}
bind2nd1.cpp
#include ‹iostream.h›
#include ‹stl.h›
int array[3] = {1, 2, 3};
int main() {
replace_if(array, array + 3, binder2nd‹greater‹int› ›(greater‹int›(), 2), 4);
for (int i = 0; i ‹ 3; i++) cout ‹‹ array[i] ‹‹ endl;
return 0;
}