I am confused as to what what the difference is between for loop and for each loop in C++. I read tutorials and some books but I am yet to see how for loop is different. With arrays, examples I have seen seem to suggest for each loop loops through the whole elements at a go. Could that be the special advantage range based loop has?
Aucun commentaire:
Enregistrer un commentaire