Skip to content

Control Flow

At its core, a program is about "doing different things based on conditions" and "repeating certain actions." In this chapter, we walk through all the C++ syntax for controlling program execution flow—from the most basic if/else to various loops, and finally to the range-for introduced in C++11. You will find that range-for is much more pleasant to write than the traditional for(int i=0; ...), and we will use it extensively later on.

Chapter Contents

Built with VitePress