Jun 9, 2014 at 11:39pm
Visual C++ 2010 is pre-C++11 so the code won't compile.
The range for loop is C++11, though, personally I prefer to do:
1 2 3 4
|
for(auto c : str) // or if I want to tweak the string auto &c
{
/* ... */
}
|
Last edited on Jun 9, 2014 at 11:40pm