I\'m always trying to learn more about the languages I use (different styles, frameworks, patterns, etc). I\'ve noticed that I never use std::for_each so I thought that perh
You can use for loop scoping C++11
for
For example:
T arr[5]; for (T & x : arr) //use reference if you want write data { //something stuff... }
Where T is every type you want.
It works for every containers in STL and classic arrays.