prog.cpp: In function ‘int main()’:
prog.cpp:6:22: error: expected unqualified-id before ‘auto’
for (int index = 0, auto it = str.begin(); it < str.end(); ++it, ++index)
^~~~
prog.cpp:6:22: error: expected ‘;’ before ‘auto’
prog.cpp:6:42: error: could not convert ‘it’ from ‘__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >’ to ‘bool’
for (int index = 0, auto it = str.begin(); it < str.end(); ++it, ++index)
^
prog.cpp:6:59: error: expected ‘)’ before ‘;’ token
for (int index = 0, auto it = str.begin(); it < str.end(); ++it, ++index)
^
prog.cpp:6:63: error: ‘it’ was not declared in this scope
for (int index = 0, auto it = str.begin(); it < str.end(); ++it, ++index)
^~
prog.cpp:6:69: error: ‘index’ was not declared in this scope
for (int index = 0, auto it = str.begin(); it < str.end(); ++it, ++index)
^~~~~