Article ID: 156589 - Last Review: December 30, 2005 - Revision: 6.1 How to use the deque::insert, begin, and end STL functions in Visual C++This article was previously published under Q156589 On This PageSUMMARY The sample code below illustrates how to use the
deque::insert, begin, and end STL functions in Visual C++. MORE INFORMATIONRequired HeaderPrototypeDescriptionEach of these functions inserts a sequence specified by the remaining operands after the element pointed to by iter in the container. The first member function inserts a single element with value x and returns an iterator that points to the newly inserted element. The second member function inserts a repetition of n elements of value x. The third member function inserts the sequence [first, last).Sample CodeNOTE: In the first line of the sample code section, /GX is equivalent to /EHsc in Visual C++ .NET or Visual C++ 2005 and is set by default.The output is: A A A The output is: B B The output is: X A A A The output is: X A A A Y The output is: X A A A Z Z Z Y The output is: X A A A Z Z Z Y B B REFERENCESFor more information about deque::insert, visit the
following Microsoft Developer Network (MSDN) Web site: http://msdn.microsoft.com/en-us/library/ee9c7677.aspx
(http://msdn.microsoft.com/en-us/library/ee9c7677.aspx)
For
more information about deque::begin and end, visit the following MSDN Web
site: http://msdn.microsoft.com/en-us/library/1ew0xf3z.aspx
(http://msdn.microsoft.com/en-us/library/1ew0xf3z.aspx)
APPLIES TO
| Article Translations
|

Back to the top
