Please explain this C++ entry

Yes is necessary , for the loop to work. This kind of for loop was introduce in C++ 11 and is called “for-each loop”.
which is used exclusively to loop through elements in an array.