There isn't a point at Undo [nUndo]. All the points exist between 0 and nUndo - 1. You can correct this problem by decrementing nUndo prior to the Undo [nUndo] line. Also, since you are getting the top element off the undo stack, there is no need for that block of code shifting the undo stack down. After you get it working, look into std::deqeu. It would really simplify the code. Tim Smith I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?