Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

In C++, a list is a container that stores elements in a linked list. Unlike arrays or vectors, which store elements in contiguous memory, lists store elements in nodes that are linked to each other by pointers.

Here is an example of how to create a list of integers and add elements to it:

...