May 2017
Intermediate to advanced
310 pages
8h 5m
English
Contrary to arrays, pointer structures are lists of items that can be spread out in memory. This is because each item contains one or more links to other items in the structure. What type of links these are dependent on the type of structure we have. If we are dealing with linked lists, then we will have links to the next (and possibly previous) items in the structure. In the case of a tree, we have parent-child links as well as sibling links. In a tile-based game where the game map is built up of hexes, each node will have links to up to six adjacent map cells.
There are several benefits with pointer structures. First of all, they don't require sequential storage space. Second, they can start small and grow arbitrarily ...