Hi
while I am reading this C++ book, I noticed the iterator is being
used to loop through a container, say a vector. I am used to use
"for(int=0;i<ve c.size();++i)" which is better to use?
also I noticed the author references a class variable by using
class-identifier.vari able-identifier instead of get_variable(); again
which is better?
I am just after improving the performance of my code.
thanks
while I am reading this C++ book, I noticed the iterator is being
used to loop through a container, say a vector. I am used to use
"for(int=0;i<ve c.size();++i)" which is better to use?
also I noticed the author references a class variable by using
class-identifier.vari able-identifier instead of get_variable(); again
which is better?
I am just after improving the performance of my code.
thanks
Comment