CS70, Spring 2001

C++ Style Tips

Programming style is a personal thing, and a difficult one to learn. I have seen a programmer produce completely unreadable code, bad enough to make other people swear at their screens, while sincerely attempting to generate an exceptionally clear and simple result.

Here are some hints for writing better C++ programs, in no particular order:

These are general guidelines only; more on coding style will be covered in class. As discussed in class, a readable program is more important than a working one, if you have to make a choice.


© 2001, Geoff Kuenning

This page is maintained by Geoff Kuenning.