SatView: Pointer Perfect, Part 1
(Page 1 of 5 )
If you code in C++, you will run into pointers sooner or later. They can be a great tool when implementing design patterns and building complex data structures. In this first of a series of articles about pointers, J. Nakamura introduces several operations that can be performed on pointers.
When you are coding in C++, you are bound to run into pointers; we are not going to discuss here whether they are good or bad, rather how we can make good use of them. Don’t worry, even if you are well versed in C++, you might still find some interesting points in this article.
Pointers can be used to strengthen your understanding of computer memory and its management. They become an invaluable tool when implementing design patterns and building complex data structures. You can delay the construction of an object by using pointers, implement your own memory management if you work with a lot of fragmented data, and build powerful abstract interfaces utilizing polymorphism and function pointers.
This is the first in a series of articles that will introduce you to the implementation of some useful patterns. In order to make good use of them, a solid understanding of pointers is a prerequisite. At the end you will have built an application in C++ that downloads and displays the latest weather satellite images of Europe from the Internet. My goal, however, is to provide you with some essential building blocks that will help you implement these useful design patterns as reusable classes.
If you encounter a topic touched in this article which you would like to see explained in more depth, please don’t hesitate to contact me.
So what is a pointer? Simple: pointers are variables that store addresses and can be null. How hard can it be or get? Read on to find out.
Next: Operations on pointers >>
More Code Examples Articles
More By J. Nakamura