|
Het Broodje van Blog:
Iterators kan van één element aan volgende worden vooruitgegaan door hen te verhogen. Some iterators can also be decremented or allow arbitrary jumps from one element to another, as we will see later. When they are dereferenced, iterators yield a reference to a container element. In addition, they can be compared to each other for equality or inequality. Iterators interact seamlessly with built-in C++ types. In particular, native C++ pointers are treated as iterators to C++ arrays. Naturally, all containers in the Standard C++ Library define an iterator type, i.e., a nested type iterator that represent their respective pointer-like type. Iterator Categories Iterators fall into categories. This is because different algorithms impose different requirements on an iterator they use. For example, the find() algorithms needs an iterator that can be advanced by incrementing it, whereas the reverse() algorithm needs an iterator that can be decremented as well, etc. Ultimately, there are five categories of iterators in STL and Standard C++ Library: An iterator category is an abstraction. It represents a set of
requirements to an iterator. The Standard Template Library is a new C++ library that provides a set of easily composable C++ container classes and generic algorithms (template functions).
At its July 1994 meeting, the ANSI/ISO C++
Standards Committee voted to adopt STL
as part of the standard C++ library. The STL proposal to the committee
by Alex Stepanov and Meng Lee of Hewlett-Packard Labs was based on
research on generic programming and generic software libraries that
Stepanov, Lee, and David Musser have been working on for several years,
in Scheme, Ada, and C++. String Functions Time Functions Technorati Tags: c programming, c code, c examples, c manual, c++, c++ programming, c++ code, c++ examples, c++ manual Popularity: 38% [?] Related Posts:No Comments »No comments yet. RSS feed for comments on this post. Leave a commentYou must be logged in to post a comment. Powered by WordPress |






















