Article ID: 158091 - Last Review: January 11, 2006 - Revision: 5.0 How to use the list::list STL functions in Visual C++This article was previously published under Q158091 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. On This PageSUMMARY The sample code below illustrates how to use the list::list
STL functions in Visual C++. MORE INFORMATIONRequired HeaderDescriptionThe 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.Sample Codeone two one two three three three three three REFERENCES Visual C++ Books On Line: Visual C++ Books:C/C++:Standard
C++ Library Reference. APPLIES TO
| Article Translations
|
Back to the top
