
Jumping into C++

for ( vector ::iterator itr = vec.begin(), end = vec.end(); itr != end; ++itr )
Alex Allain • Jumping into C++
vector ::iterator
Alex Allain • Jumping into C++
itr++;
Alex Allain • Jumping into C++
vector a_vector( 10 );
Alex Allain • Jumping into C++
map—taking one value and using it to look up another.
Alex Allain • Jumping into C++
a_vector[ i ] = 0;
Alex Allain • Jumping into C++
a_vector.size();
Alex Allain • Jumping into C++
The iterator, when you dereference it, has two fields, first and second. The first field is the key, and the second field is the value.
Alex Allain • Jumping into C++
name_to_address.clear();