Break and Continue

We’ve seen the break in a switch statement. It stops running the blocks of code, and simple exits out of the switch. In the same manner, if you use a break in a loop, it exits us from the loop prematurely (not by the loop condition). The continue keyword moves us to the end of…

For Loops in C++

The for loop is the counting loop of C++. It is usually designed to run a specific number of times, and then end. With it, it keeps a counter, to let you know where in the loop you are – useful when looping through an array which will look at soon enough. The general form…

The Main Content Section of your Web Page

In the center of the page you’ll typically find one or more columns that contain content. Generally there is a larger column, and one or two smaller columns – often called a sidebar. The sidebar generally contains information about upcoming events, recent updates to the website, or various other pieces of information which is related…

The Web Page Footer

At the bottom of the page, you can find the footer. This is where you traditionally found the copyright information, such as the year.  Nowadays, with some modern legislation based in different countries’ laws, you can often find links to web privacy standards, terms or use (or usage), and the cookie usage policy to remain…

The C++ Do-While Loop

The Do-While loop is similar to the while loop. It is a conditional loop, just like the while loop, running the body of the loop while the condition is met. However, the big difference is that the do-while loop is a post-test loop. That means that the body runs at least once, and then there…

The C++ While Loop

A while loop says to perform a set of operations while a condition is true. It is known as a pre-test loop, because the condition is tested before the loop is run at all, meaning the body of the loop may never run. The general form for a while loop is: Notice that the loop…