auto with refrece plus another bit, i think i need an explaination.

I thought for was for iterating through a set of ints and can't find any sample that looks like this. Can someone explain what is going on here?
 
  for(auto& c : components) c->update(mFT);
This is a range-based for loop.
c is a lvalue reference which binds every element of components in sequence:
http://en.cppreference.com/w/cpp/language/range-for
Topic archived. No new replies allowed.