The bool type is conceptually the simplest type supported by C++. It can have only two values:
As a result, it is possible to perform arithmetic operations on variables of type bool (but the resulting code may be very confusing).
The bool type is commonly used in some sort of a test to determine what to do next, such as:
if some test returns true, then