In This Chapter
Using two types of memory: the stack and the heap
Accessing variable addresses through pointers
Creating variables on the heap by using the new keyword
Taking pointers as parameters and returning pointers
Modifying variables the easy way
Where do you live? Don’t say it out loud, because thousands of people are reading this book and you don’t want them all to know. So just think about your address. Most places have some sort of address so that the mail service knows where to deliver your packages and the cable guy can show up sometime between now and 5:00 next Thursday. (So make sure that you’re there.)
Other things have addresses, too. For example, a big corporation in an office building likely has all its cubes numbered. And offices in buildings usually have numbers; and apartments normally have numbers, too.
Now suppose that someone named Sam works in office number 180. Last week, however, Sam got booted out the ...