< previous page page_439 next page >

Page 439
assert()
Use assert() freely. It helps find errors, but it also clarifies the assumptions for the reader. It also helps to focus the writer's thoughts around what is valid and what isn't.
const.
Use const wherever appropriate: for parameters, variables, and methods. Often there is a need for both a const and a non-const version of a method; don't leave one out if both are needed. Be very careful when explicitly casting from const to non-const and vice versathere are times when this is the only way to do somethingbut be certain that it makes sense, and include a comment.
Next Steps
You've worked hard, and you are now a competent C++ programmer, but you are by no means finished. There is much more to learn, and many more books to read as you move from novice C++ programmer to expert.
The following sections recommend a number of specific books, and these recommendations reflect only my personal experience and opinions. There are dozens of books on each of these topics, however, so be sure to get other opinions before purchasing.
Where to Get Help and Advice
The very first thing you will want to do as a C++ programmer will be to tap into one or more C++ conferences on an online service. These groups supply immediate contact with hundreds or thousands of C++ programmers who can answer your questions, offer advice, and provide a sounding board for your ideas.
Required Reading
The very next book I'd run out and buy and read is:
Meyers, Scott. Effective C++ (ISBN: 0201924889) by Scott Meyers, from Addison-Wesley Publishing, 1997.
This is by far the most useful book I've ever read, and I've read it three times.
You may also want to consider some of my other books, including C++ Unleashed (SAMS, ISBN: 0-672-31241-7, 1999) for advanced C++ techniques and Beginning Object-oriented Analysis and Design (Wrox Press, ISBN: 1861001339, 1998) for more information about the techniques of object-oriented analysis and design and the Unified Modeling Language (UML). Finally, you may want to take a look at my forthcoming

 
< previous page page_439 next page >

If you like this book, buy it!