A
Allerdyce.John
Hi,
I am reading c++ primer, in the section about iteraor, it has an
example:
To iterate over the elements of any container type, we write
for (iter = container.begin(); iter != container.end(); ++iter)
do_soemthing_wtih_element (*iter);
why we write "++iter" instead of "iter++"?
I am reading c++ primer, in the section about iteraor, it has an
example:
To iterate over the elements of any container type, we write
for (iter = container.begin(); iter != container.end(); ++iter)
do_soemthing_wtih_element (*iter);
why we write "++iter" instead of "iter++"?