What's Next

Templates are powerful tools, and there's much more to them than what I've discussed. This book is meant to be an introduction to the world of C++, not the definitive guide book. My favourite C++ tutorial book has been Stanley Lippman's C++ Primer, 3rd edition, and of course the best reference is from the C++ man himself, Bjarne Stroustrup. The C++ Programming Language is an essential part of any serious programmer's bookshelf. (Both of these books are from Addison-Wesley.)

C++ is a very rich language with many ways of saying the same thing. Some critics believe this is a bad thing, since programmers become confused about which approach to use. However, this is also true about natural languages like English (which has far too many words meaning almost the same thing), and the solution is to learn good C++ style. Style depends on context; if I am experimenting with code interactively with UnderC, I will use macro shortcuts. They are also appropriate with “quick and dirty” code you write for your own purposes (like specialized tools). But they are not appropriate for programs which are worked on by other people; simularly, another rule is not to use using namespace xxx (where xxx is some namespace, usually std) in header files. It is useful to remember that a program is a public document that is meant to be read by humans as well as computers.

The best way to learn good style is to read lots of good C++ code and make lots of mistakes. This sounds like a joke, but it isn't: learning from your mistakes is the main learning skill you will need. Mistakes are an opportunity to learn something new. Also, learn from the C++ community; there are many C++ resources available on the Net. I have provided links to some of these pages on the C++ By Example site: see http://home.mweb.co.za/sd/sdonovan/ccbx.htm.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.138.202