Check out example codes for "c++ boolean". It will help you in understanding the concepts better.

Code Example 1

bool isCodingFun = true;
bool isFishTasty = false;
cout << isCodingFun;  // Outputs 1 (true)
cout << isFishTasty;  // Outputs 0 (false)

//credit to w3schools.com

Code Example 2

bool b1 = true;      // declaring a boolean variable with true value

Learn ReactJs, React Native from akashmittal.com