#include #include #include //for class iterator_traits #include //includes , so previous line not needed here using namespace std; int main() { const int a[] = {10, 20, 30, 40, 50}; size_t n = sizeof a / sizeof a[0]; cout << fixed; const int *it1 = a; iterator_traits::value_type x1 = *it1; cout << x1 << "\n"; //x1 is an int (not a const int) vector v(a, a + n); vector::iterator it2 = v.begin(); iterator_traits::iterator>::value_type x2 = *it2; cout << x2 << "\n"; //x2 is a double. #define ITERATOR vector::iterator ITERATOR it3 = v.begin(); iterator_traits::value_type x3 = *it3; cout << x3 << "\n"; //x3 is a double. return EXIT_SUCCESS; }