2

Below is an example with std::deque for forward looping, using "enhanced for loop":

  int a[] = { 0, 1, 2, 3, 4, 5 };
  std::deque<int> dq(a, a+6);    
  for(auto i : dq) 
    std::cout << i << ", ";

What is the correct syntax (if possible) of "enhanced for loop" to iterate in reverse for a given STL container?

iammilind
  • 68,093
  • 33
  • 169
  • 336
  • @Yuushi, Thanks, I too will vote for close (not deleting to let this question be there for another Google search for future visitora). [This answer](http://stackoverflow.com/a/14468490/514235) seems to be without using Boost. – iammilind May 08 '13 at 07:28

0 Answers0