I have a animation class which stores the frames in a std::list, the header file declares a iterator, I increment the iterator using time. My animations are working fine until I try to reverse the animation (from the current position), I can’t decrement the iterator (bidirectional huh?). I’ve thought about storing a reverse iterator too but can’t find a nice way to switch between the two.
How can I seamlessly switch between forward iterating and reverse iterating (without starting from the beginning of the std::list).
What do you mean “I can’t decrement the iterator”?
On my Visual C++ 2010, this works: