Summary
In this chapter, we have covered pointers and discussed that they are variables that hold a memory address to a specific type of object. The full significance of this will begin to reveal itself as this book progresses and the power of pointers is revealed.
We also used pointers in order to create a huge horde of zombies that can be accessed using a pointer, which it turns out is also the same thing as the first element of an array.
We learned about the STL, and in particular the map
class. We implemented a class that will store all our textures, as well as providing access to them.
In the next chapter, we will get to use what we have learned in this chapter. We will implement a horde of zombies using pointers and arrays and we will explore a neat way to handle textures for our sprites by using a map. We will also dig a little deeper into OOP and use a static function, which is a function of a class that can be called without an instance of the class...