If we are going back to using variables inside the for loop, as old for loops did, what are the advantages of using a range-based for-loop?
@andreas_fertig Жыл бұрын
Good point. The range-based for-loop still provides a safe method to access the elements. The addition variable would not create an out-of-bounds access... at least in my example.