Iterators question

This is a discussion on Iterators question within the C++ Programming forums, part of the General Programming Boards category; If I am passing a const reference to a vector (const vector<CustomerData> &c) to a function, is it possible to ...

Iterators question

If I am passing a const reference to a vector (const vector<CustomerData> &c) to a function, is it possible to declare an iterator for it inside the function? I am getting compiler error that iterator cannot be instantiated here. Works fine when I pass by value (ie: non-const).

Hrm, nevermind. So simple... who would've thought the STL programmers made a const_iterator type.