4SOLVING PROBLEMS WITH POINTERS AND DYNAMIC MEMORY

image

In this chapter, we’ll learn to solve problems using pointers and dynamic memory, which will allow us to write flexible programs that can accommodate data sizes that are unknown until the program runs. Pointers and dynamic memory allocation are “hard-core” programming. When you can write programs that grab blocks of memory on the fly, link them into useful structures, and clean up everything at the end so there is no residue, you’re not just someone who can do a little coding—you’re a programmer.

Because pointers are tricky, and because many popular languages, such as Java, appear to forgo the ...

Get Think Like a Programmer now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.