O'Reilly logo

Sams Teach Yourself C++ in One Hour a Day, Eighth Edition by Siddhartha Rao

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Lesson 18. STL list and forward_list

The Standard Template Library (STL) supplies the programmer with a doubly linked list in the form of template class std::list. The main advantage of a linked list is in fast and constant time insertion and removal of elements. Starting with C++11, you can also use a singly linked list in the form of std::forward_list that can be traversed only in one direction.

In this lesson, you learn

Image How to instantiate list and forward_list

Image How to use the STL list classes, including insertion and removal

How to reverse and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required