I have the following loop in more then one place:
for(int step = 1; step < timesteps; step++) ...
Then I had to change timesteps to start at 0. And I have to change it in more then one place.
May I take advantage of range based for loops in this situation? So may be I can write just
for(auto &step : timesteps) ...
In that case what kind of timesteps should be used? std::vector timesteps?
Before I forget to mention, timesteps is just an int i.e. int timesteps = 10;
. Unknown at compile time, the user will define it.
p.s.: stl is preferred over boost.