Article ID: 157671 - Last Review: September 23, 2003 - Revision: 3.0 INFO: STL Sample for the advance() FunctionThis article was previously published under Q157671 NOTE: Microsoft Visual C++ NET (2002) supported both the managed code
model that is provided by the .NET Framework and the unmanaged native Windows
code model. The information in this article applies to unmanaged Visual C++
code only. On This PageSUMMARY The sample code below illustrates how to use the advance()
STL function in Visual C++. MORE INFORMATION Because only random access iterators provide + and -
operators, the library provides two template functions, advance() and
distance(). Required HeaderPrototypeDescriptionThe advance function accepts two parameters:
iterator += n. ++iterator. NOTE: The class/parameter names in the prototype may not match the version in the header file. Some have been modified to improve readability. Sample CodeThe list is: A1 B2 C3 D4 E5 F6 G7 Advance to the 3rd element. The element is C3 REFERENCES Visual C++ Books On Line: Visual C++ Books:C/C++:Standard
C++ Library Reference. APPLIES TO
| Article Translations
|
Back to the top
