No Title



next up previous
Next: Commenting

15-211 C++ Programming Guidelines

The C++ programming language allows extreme flexibility in the design of programs as far as style and layout of program text is concerned. However, just because a program compiles correctly and functions correctly does not mean it will necessarily get an `A' in this course. A number of style guidelines should be followed by students in order to produce programs which are easy to read. By following these procedures, your programs will be cleaner, simpler, easier to debug, nicer to look at, and more likely to run correctly. You will find that by adopting these habits the process of writing programs for this course and beyond will be a much more enjoyable and much less tedious task.

By following the style guidelines listed below, you will help to improve the readability of your programs. This, however, is by no means a complete list of all aspects of good programming style. Other style issues will be pointed out to you as you get back your programs.

Remember that you are writing programs for others to read. When in doubt about how to organize a piece of code, always try and use the most intuitive format. You are not trying to write a super-compact piece of code, but to show that you understand the principles of program and data structure design being taught in the course.





Kan Deng
Fri Jan 20 18:19:52 EST 1995