クリックして評価とフィードバックをお寄せください
MSDN
MSDN ライブラリ
Visual Studio 2005
Visual Studio ドキュメント
Visual C++
リファレンス
ライブラリ リファレンス
Standard C++ Library
Standard C++ Library Header Files
<iterator>

  低帯域幅での表示をオンにする
このページは次のバージョンについて記述しています。
Microsoft Visual Studio 2005/.NET Framework 2.0

その他のバージョンについては、以下の情報を参照してください。
Standard C++ Library Reference
<iterator>

Defines the iterator primitives, predefined iterators and stream iterators, as well as several supporting templates. The predefined iterators include insert and reverse adaptors. There are three classes of insert iterator adaptors: front, back, and general. They provide insert semantics rather than the overwrite semantics that the container member function iterators provide.

For a list of all members of this header, see <iterator> Members.

#include <iterator>

Iterators are a generalization of pointers, abstracting from their requirements in a way that allows a C++ program to work with different data structures in a uniform manner. Iterators act as intermediaries between containers and generic algorithms. Instead of operating on specific data types, algorithms are defined to operate on a range specified by a type of iterator. Any data structure that satisfies the requirements of the iterator may then be operated on by the algorithm. There are five types or categories of iterator, each with its own set of requirements and resulting functionality:

  • Output: forward moving, may store but not retrieve values, provided by ostream and inserter.

  • Input: forward moving, may retrieve but not store values, provided by istream.

  • Forward: forward moving, may store and retrieve values.

  • Bidirectional: forward and backward moving, may store and retrieve values, provided by list, set, multiset, map, and multimap.

  • Random access: elements accessed in any order, may store and retrieve values, provided by vector, deque, string, and array.

Iterators that have greater requirements and so more powerful access to elements may be used in place of iterators with fewer requirements. For example, if a forward iterator is called for, then a random-access iterator may used instead.

コミュニティ コンテンツ   コミュニティ コンテンツとは
新しいコンテンツの追加 RSS  注釈
Processing
© 2009 Microsoft Corporation. All rights reserved. 使用条件  |  商標  |  プライバシー
Page view tracker