The for ranged-based loop was introduced from C++11 and has a slightly better performance. It is not always a case to be used, but whenever you can use it! For programmers of other languages loop for ranged-based can be compared to foreach.
In today’s cpp::daily we will show you 5 examples that will facilitate your understanding so you can use them whenever necessary!