I've been receiving a constant stream run time errors using vectors.
So, can anyone tell me if the second method is safer?
1. for(vector<type >::iterator it = test_vector.beg in(); it != test_vector.end (); it++)
2. for(vector<type >::iterator it = test_vector.beg in(); it < test_vector.end (); it++)
My feeling is that the second one is better. If so, why don't I see it too much in tutorials and stuff?
So, can anyone tell me if the second method is safer?
1. for(vector<type >::iterator it = test_vector.beg in(); it != test_vector.end (); it++)
2. for(vector<type >::iterator it = test_vector.beg in(); it < test_vector.end (); it++)
My feeling is that the second one is better. If so, why don't I see it too much in tutorials and stuff?
Comment