C R, CSC1253/2, F 2010: Oding Ules ALL
C R, CSC1253/2, F 2010: Oding Ules ALL
There is no 'best' way to format program text, comments, etc. Nevertheless, this document is meant to
give you a guideline of how to format your C++ programs. I consider it more important to format the C++
source consistently than to meticulously follow all the rules mentioned here. At the same time, if you
adhere to the rules described below your program will be easy to read and to understand. You and
others will have a stress-free way to check for block-structuring errors without having to switch
attention back-and-forth between different sections of the program.
The rules are as follows, and we believe that all of our example code has been formatted accordingly: