Summary
There is lot to say about C++ control flow constructs. C++ has all the traditional conditional and loop statements that allow the programmer to express complex algorithms. What is unique to C++ is the ability to put assignment statements within the logical expressions in conditional statements and in the loop. Combined with C++ capability to treat any nonzero value as a true boolean value gives in the hands of a C++ programmer a powerful tool for writing concise and forceful code.
For beginning programmers, it might be difficult to understand this kind of code. In your study of C++, it is important to allocate enough time for mastering these features. All too often, C++ programmers concentrate on studying classes and objects and neglect ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access