Article ID: 158091
Note Microsoft Visual C++ .NET 2002 and Microsoft Visual C++ .NET 2003 support both the managed code model that is provided by the Microsoft .NET Framework and the unmanaged native Microsoft Windows code model. The information in this article applies only to unmanaged Visual C++ code. Microsoft Visual C++ 2005 supports both the managed code model that is provided by the Microsoft .NET Framework and the unmanaged native Microsoft Windows code model.
The sample code below illustrates how to use the list::list STL functions in Visual C++.
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 first constructor specifies an empty initial controlled sequence. The second constructor specifies a repetition of n elements of value x. The third constructor specifies a copy of the sequence controlled by x. The last constructor specifies the sequence [first, last). All constructors store the allocator object al, or for the copy constructor, x.get_allocator(), in allocator and initialize the controlled sequence.
Program Output is:
one two one two three three three three three
Visual C++ Books On Line: Visual C++ Books:C/C++:Standard C++ Library Reference.