for loop replaced with for_each() and class Afficher