Hi guys. I'm new to programming. I have a question. I've seen a book teaching C++ and here's the code they gave:
It seems that when I didn't add the boolalpha inCode:// This programme shows an example of bool data type
#include <iostream>
using namespace std;
int main()
{
bool excellent = true, good = false;
cout<< "The value of excellent is "<< boolalpha << excellent<< endl;
cout<< "The value of good is "<< boolalpha<< good;
cin.get();
}
, it still display the true and false. Why is that so? Can anyone help me?Code:cout<< "The value of good is "<< boolalpha<< good;