+ 1

Unknown symbol (for me).

This code... https://code.sololearn.com/c61YI3VPm1TK/#cpp I'm not sure of the purpose of symbol : in loop for (Is it an operator?). This symbol got me an error on compiler: DevC++, run on Windows7; [Error] range-based 'for' loops are not allowed in C++98 mode; What it means?. Plz, correct me about my english if i'm wrong.

24th Jan 2018, 11:35 PM
JesusP1978
JesusP1978 - avatar
3 ответов
+ 9
this -> for (char& i : str) Is only supported in c++11 or higher. http://en.cppreference.com/w/cpp/language/range-for You will need to set your compiler options to enable c++11 https://stackoverflow.com/questions/16951376/how-to-change-mode-from-c98-mode-in-dev-c-to-a-mode-that-supports-c0x-ran
24th Jan 2018, 11:36 PM
jay
jay - avatar
+ 2
Thx @jay, I didn't know about it.
24th Jan 2018, 11:38 PM
JesusP1978
JesusP1978 - avatar
+ 2
Thx @John Wells nice information.
24th Jan 2018, 11:43 PM
JesusP1978
JesusP1978 - avatar