#include #include #define SIZE 10 using namespace std; int main() { vector ints; for(int i=0; i<10; i++) ints.push_back(SIZE-i); for(vector::iterator it=ints.begin(); it!=ints.end(); it++) { *it += 10; // we modify container here cout << *it << " "; } cout << endl; for(vector::const_iterator it=ints.cbegin(); it!=ints.cend(); it++) { // *it += 10; // this is not allowed for a const_iterator (only input iterator) cout << *it << " "; } }