bnegate2.cpp
bnegate2.cpp
#include ‹iostream.h›
#include ‹stl.h›
int array[4] = {4, 9, 7, 1};
int main() {
sort(array, array + 4, not2(greater‹int›()));
for (int i = 0; i ‹ 4; i++) cout ‹‹ array[i] ‹‹ endl;
return 0;
}
bnegate2.cpp
#include ‹iostream.h›
#include ‹stl.h›
int array[4] = {4, 9, 7, 1};
int main() {
sort(array, array + 4, not2(greater‹int›()));
for (int i = 0; i ‹ 4; i++) cout ‹‹ array[i] ‹‹ endl;
return 0;
}