Home Segments Index Top Previous Next

283: Mainline

Many C++ programmers use braces in every if statement they write, even though the braces often surround just one statement. Such programmers argue that the habitual use of braces reduces errors later on when a program is modified. When braces are not used, it is easy to add a second embedded statement to the if statement, yet forget that the modification requires the addition of braces.