1 min
C++ offers several simple and easy ways to loop. Loops can be used to process the same logic a number of times. The most common is the for loop, followed by while and the do-while. These loops are known as conditional because they continue to loop until a specific condition is met.
The for loop is simply defined using:
for( int i=0; i<10; ++i )
{
// Logic goes here...
}
As you can see it’s basic usage is simple and easy to reason.
Subscribe to this blog via RSS.
Blog 4
Blog (4) Networking (1) Development (3) Code-snippets (1) Low-level programming (10) Nothing interesting (1) Snake game (5) Board games (3) Game adaptions (1) Play & games (2) Assignments (1) Level design (1) Endless runner (1) Birdman game (1) Group work (2) Networking game (1)