#include
#include
#include
#include
using namespace std;
int main()
{
vector vectorObject;
int i;
for(i = 1; i < 10; i++)
vectorObject.push_back((bool)(i % 2));
cout << boolalpha; // turn on boolalpha I/O flag
cout << "Original contents of vectorObject:";
for(i = 0; i cout << vectorObject[ i ] << " ";
cout << endl;
// use the logical_not function object
transform(vectorObject.begin(), vectorObject.end(), vectorObject.begin(), logical_not());
cout << "Inverted contents of vectorObject:";
for(i = 0; i cout << vectorObject[ i ] << " ";
cout << endl;
return 0;
}