© Will Briggs 2019
Will BriggsC++ for Lazy Programmershttps://doi.org/10.1007/978-1-4842-5187-4_23

23. The Standard Template Library

Will Briggs
(1)
Lynchburg, VA, USA
 
Should every programmer make his/her own vector class, list class, and so on? Oh, of course not. So some time back the Standard Template Library (STL) was developed and put into the standard. In STL you’ll find containers like list and vector; strings, as we already use them; and commonly needed functions like swap, find, and copy.
You’ll also find an annoying emphasis on efficiency. I say “annoying” because STL promotes efficiency by disabling things you may want to do that are inefficient. For instance, if you want to use operator[] with a list you can forget it: it takes too long ...

Get C++ for Lazy Programmers: Quick, Easy, and Fun C++ for Beginners now with the O’Reilly learning platform.

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