// archives

bool

This tag is associated with 2 posts

for Loop Parts

A for loop provides

A step-by-step recipe for performing repeated actions

Let’s take a detailed look at how it’s set up

The usual parts of a for loop handle these steps:

Setting a value initially
Performing a test to see whether the loop should continue
Executing the loop actions
Updating value(s) used for the test

The C++ loop design positions these elements

So that [...]

The bool Type

The ANSI/ISO C++ Standard has added a new type (new to C++)

Is called bool     

 It’s named in honor of the English mathematician George Boole, who developed a mathematical representation of the laws of logic

In computing, a Boolean variable

Is one whose value can be either true or false

In the past, C++, like C

Has not had a Boolean [...]