// pointers06.cpp #include #include typedef unsigned int pixelValue; typedef std::pair pixelIndex; class Undo { public: Undo(pixelIndex startOfLine, pixelIndex endOfLine, const std::vector >& bitmap) { // store old values on line } void Restore(std::vector >& bitmap) const { // restore old values in correct places } private: std::map m_OldValue; };