#include <iostream>
using std::boolalpha;
using std::cout;
using std::endl;
using std::noboolalpha;
int main()
{
bool booleanValue = true;
cout << "booleanValue is " << booleanValue << endl;
cout << "booleanValue (after using boolalpha) is "<< boolalpha << booleanValue << endl << endl;
booleanValue = false; // change booleanValue
cout << noboolalpha << endl; // use noboolalpha
cout << "booleanValue is " << booleanValue << endl;
cout << "booleanValue (after using boolalpha) is " << boolalpha << booleanValue << endl;
return 0;
}
|