One needs to traverse the whole list till the required element is found in order to perform any operation. As compared to other sequence containers, the performance of List is not as good as the direct access of the elements is not possible.But once the element is found, operations like insertion and deletion become very easy. List in C++ has a slow traversal as a comparison to the Vectors.Elements in the list are connected with each other using the link of the doubly linked list of its proceeding and the previous elements.The list allows the non- contiguous storage of elements which means Elements of the list can be stored at different locations in the memory.List in C++ is implemented as a doubly-linked list which allows the operations like insertion, deletion, and access from both directions.Alloc: It is an allocator object and defines the memory allocation.įew important points defining the working and features of the list in C++ are given below:.It can be a user-defined type of element. T: It is the type of element to be stored in the list.One needs to import the header file to use the list in the program.Web development, programming languages, Software testing & othersīelow given is the basic syntax of using the list on C++ programs: Start Your Free Software Development Course