The Minimum You Need to Know About C++C++ is an extremely complex language, and using the new technologies too much and too fast can create totally unreliable programs with all kinds of memory leaks, perfor-mance issues, and so on. The problem with C++ is that it is a language of black boxes. A number of processes go on behind the scenes, and you may never find bugs that you have created. However, if you start off using just a little C++ here and there and then add new features to your repertoire as you need them, you'll be fine. The only reason that I even wrote this appendix on C++ is that DirectX is based on it. However, most of C++ is encapsulated in wrappers and COM interfaces that you communicate with via function pointer calls—that is, calls of the form interface->function(). If you've made it this far in the book, you must have just dealt with that weird syntax. Moreover, Chapter 5, "DirectX Fundamentals and the Dreaded COM," the chapter on COM (Component Object Model) should have eased your nerves on the subject. In any event, I am going to cover just the basics so you can better understand C++, talk about it with your friends, and have a good working knowledge of what's available. I am going to cover some new types, conventions, memory management, stream I/O, basic classes, and function and operator overloading, and that's about it—but believe me, that's enough! So, let's get started… |