prog.cpp: In function 'int main(int, char**)':
prog.cpp:45:29: error: 'begin' was not declared in this scope
for (const auto i : y) cout << i << endl;
^
prog.cpp:45:29: note: suggested alternatives:
In file included from /usr/include/c++/5/string:51:0,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from prog.cpp:1:
/usr/include/c++/5/bits/range_access.h:87:5: note: 'std::begin'
begin(_Tp (&__arr)[_Nm])
^
/usr/include/c++/5/bits/range_access.h:87:5: note: 'std::begin'
prog.cpp:45:29: error: 'end' was not declared in this scope
for (const auto i : y) cout << i << endl;
^
prog.cpp:45:29: note: suggested alternatives:
In file included from /usr/include/c++/5/string:51:0,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from prog.cpp:1:
/usr/include/c++/5/bits/range_access.h:97:5: note: 'std::end'
end(_Tp (&__arr)[_Nm])
^
/usr/include/c++/5/bits/range_access.h:97:5: note: 'std::end'