Auto specifier

Why cannot deduce the type?

1
2
    vector <int> vec;
    auto Itr = vec.iterator (); 


Source code: http://www.cprogramming.com/c++11/c++11-auto-decltype-return-value-after-function.html
Last edited on
auto Itr = vec.iterator ();

This line is incorrect; I think he meant vec.begin();
The method iterator() of vector's template do not exists..
Last edited on
Topic archived. No new replies allowed.