A Word About Memory

When you declare an array, you tell the compiler exactly how many objects you expect to store in it. The compiler sets aside memory for all the objects, even if you never need to use it. This isn't a problem with arrays for which you can estimate how many objects you'll need. For example, a chessboard has 64 squares, and CATs generally have between 1 and 10 kittens. When you have no idea of how many objects you'll need, however, you must use more advanced data structures.

This book looks at arrays of pointers, arrays built on the heap, and various other collections. More advanced data structures that solve large data-storage problems are beyond the scope of this book. Two great things about programming are that there are always more things to learn and that there are always more books from which to learn.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.6.10