Many algorithms operate on sequences using iterators and values only. For example, we can find() the first element with the value 7 in a sequence like this:
void f(list<int>& c)
{
list<int>::iterator p = find (c.begin(), c.end(),7);
// ...
}
You are currently reading a PREVIEW of this book.
Get instant access to over
$1 million worth of books and videos.