• + 1 comment

    Its ranged for. Do note that this will work only with C++11. And auto is the magic keyword. You can skip writing complex datatypes if you are initializing a variable when you are declaraing it. The compiler will determine the datatype for you from the context. & is necessary here otherwise values within string will not change.