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 ...
Get Core C++ A Software Engineering Approach now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.