This book approaches C++ from a game programming perspective unlike any other on the market. Offering a thorough and modern introduction to C++, this book is everything that an aspiring game programmer needs in order to learn the fundamentals of C++ and game programming basics. There is no programming experience necessary-the book starts at the beginning of C++ and game programming. Therefore, even readers without any previous programming experience can get as much out of the book as anyone else. Beginning C++ Game Programming presents a small but complete program for each new concept and a complete game program at the end of each chapter. It then presents readers with a final game project at the end of the book that combines most of the major topics covered. Skillfully written in an easy-to-understand manner, this book is a great place to get started with game programming. Contents......Page 7 Introduction......Page 12 Introducing C++......Page 16 Writing Your First C++ Program......Page 19 Working with the std Namespace......Page 24 Using Arithmetic Operators......Page 26 Declaring and Initializing Variables......Page 28 Performing Arithmetic Operations with Variables......Page 36 Working with Constants......Page 40 Introducing Lost Fortune......Page 42 Summary......Page 45 Questions and Answers......Page 46 Discussion Questions......Page 47 Exercises......Page 48 Understanding Truth......Page 50 Using the if Statement......Page 51 Using the else Clause......Page 55 Using the switch Statement......Page 58 Using while Loops......Page 61 Using do Loops......Page 63 Using break and continue Statements......Page 65 Using Logical Operators......Page 67 Generating Random Numbers......Page 73 Understanding the Game Loop......Page 76 Introducing Guess My Number......Page 78 Summary......Page 81 Questions and Answers......Page 82 Discussion Questions......Page 83 Exercises......Page 84 Using for Loops......Page 86 Understanding Objects......Page 90 Using string Objects......Page 92 Using Arrays......Page 98 Understanding C-Style Strings......Page 102 Using Multidimensional Arrays......Page 103 Introducing Word Jumble......Page 105 Summary......Page 109 Questions and Answers......Page 110 Exercises......Page 112 Introducing the Standard Template Library......Page 114 Using Vectors......Page 115 Using Iterators......Page 120 Using Algorithms......Page 127 Understanding Vector Performance......Page 131 Examining Other STL Containers......Page 133 Planning Your Programs......Page 134 Introducing Hangman......Page 135 Summary......Page 139 Questions and Answers......Page 140 Discussion Questions......Page 141 Exercises......Page 142 Creating Functions......Page 144 Using Parameters and Return Values......Page 147 Understanding Software Reuse......Page 152 Working with Scopes......Page 153 Using Global Variables......Page 157 Using Default Arguments......Page 160 Overloading Functions......Page 164 Inlining Functions......Page 166 Introducing the Mad Lib Game......Page 168 Summary......Page 171 Questions and Answers......Page 172 Discussion Questions......Page 173 Exercises......Page 174 Using References......Page 176 Passing References to Alter Arguments......Page 179 Passing References for Efficiency......Page 182 Deciding How to Pass Arguments......Page 185 Returning References......Page 186 Introducing the Tic-Tac-Toe Game......Page 189 Summary......Page 201 Questions and Answers......Page 202 Exercises......Page 204 Understanding Pointer Basics......Page 206 Understanding Pointers and Constants......Page 213 Passing Pointers......Page 216 Returning Pointers......Page 220 Understanding the Relationship between Pointers and Arrays......Page 224 Summary......Page 228 Questions and Answers......Page 230 Discussion Questions......Page 231 Exercises......Page 232 Defining New Types......Page 234 Using Constructors......Page 239 Setting Member Access Levels......Page 241 Using Static Data Members and Member Functions......Page 246 Introducing the Critter Caretaker Game......Page 250 Summary......Page 256 Questions and Answers......Page 257 Discussion Questions......Page 258 Exercises......Page 259 Using Aggregation......Page 260 Using Friend Functions and Operator Overloading......Page 264 Dynamically Allocating Memory......Page 267 Working with Data Members and the Heap......Page 273 Summary......Page 290 Questions and Answers......Page 291 Exercises......Page 293 Introducing Inheritance......Page 294 Controlling Access under Inheritance......Page 299 Calling and Overriding Base Class Member Functions......Page 301 Using Overloaded Assignment Operators and Copy Constructors in Derived Classes......Page 305 Introducing Polymorphism......Page 306 Using Abstract Classes......Page 311 Organizing Your Code......Page 314 Introducing the Blackjack Game......Page 318 Summary......Page 337 Questions and Answers......Page 338 Exercises......Page 339 B......Page 340 C......Page 341 E......Page 342 H......Page 343 I......Page 344 M......Page 345 P......Page 346 R......Page 347 S......Page 348 V......Page 349 Y......Page 350 Title from e-book title screen (viewed on June 17, 2004)