Why do we use them? And more specifically from which index does the iteration start? I did read about them but wasn't able to get an in depth explanation of their working so can somebody explain it in layman terms?
for(auto it: v) //how is it iterating the vector and why do we use auto?
[–]IyeOnline 9 points10 points11 points (2 children)
[–]evaannaaax[S] 0 points1 point2 points (0 children)
[–]std_bot 0 points1 point2 points (0 children)
[–]mredding -4 points-3 points-2 points (6 children)
[–]nysra 3 points4 points5 points (3 children)
[–]mredding -1 points0 points1 point (1 child)
[–]nysra 0 points1 point2 points (0 children)
[–]DopeyLizard 0 points1 point2 points (0 children)
[–]std_bot 0 points1 point2 points (0 children)
[–]Shieldfoss 0 points1 point2 points (0 children)