< Previous | Contents | Next >
Whether you’re talking about alien spacecrafts, poisonous arrows, or angry mutant chickens, games are full of objects. Fortunately, C++ lets you represent game entities as software objects, complete with member functions and data members. These objects work just like the others you’ve already seen, such as
255
256 Chapter 8 n Classes: Critter Caretaker
string and vector objects. But to use a new kind of object (say, an angry mutant chicken object), you must first define a type for it.