The information in this article applies to:
SUMMARYThe sample code below illustrates how to use the list::back, list::front, list::pop_back, list::pop_front, list::push_back, and list::push_front STL functions in Visual C++. MORE INFORMATIONRequired Header
Prototype NOTE: The class/parameter names in the prototype may not match the version
in the header file. Some have been modified to improve readability.
DescriptionThe member function back returns a reference to the last element of the controlled sequence. The member function front returns a reference to the first element of the controlled sequence. The member function pop_back removes the last element of the controlled sequence. The member function pop_front removes the first element of the controlled sequence. All the above functions require that the controlled sequence be non-empty.The member function push_back inserts an element with value x at the end of the controlled sequence. The member function push_front inserts an element with value x at the beginning of the controlled sequence. Sample Code
The Program Output is:
REFERENCESVisual C++ Books On Line: Visual C++ Books:C/C++:Standard C++ Library Reference. Additional query words: STL STLSample kbdss list::back list::front list::pop_back list::pop_front list::push_back list::push_front
Keywords : kbcode kbVC420 kbVC500 kbVC600 kbDSupport STLIss |
Last Reviewed: November 23, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |