Chapter     15

STL List

The STL list template is another linear data collection. The previous chapter briefly mentioned the difference between array, vector, and list, and this chapter goes into more detail about why and when you would use these different collections. The main point to remember is that you should always use the correct tool for the job at hand. Video games rely on extracting the most performance possible from the target hardware, and access times to data in collections is a major bottleneck with modern processors. This chapter shows you how to build your own list class in an effort to help you understand the difference between arrays and linked lists.

Understanding Array and List Memory Layouts

An array is a very efficient method ...

Get Learn C++ for Game Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.