I'm going to guess that's because you have the function marked as a const function, so it has to be able to work on a const vector.
Type: Posts; User: tabstop
I'm going to guess that's because you have the function marked as a const function, so it has to be able to work on a const vector.
That just declares a variable, in this case an uninitialized variable. If you had an initialization portion there, like
vector<Vehicle *>::iterator it = something;
then you'd have an...
And surely your year variable has to be inside your for-loop and not above it?