in this case, the SetMapValue() and the Fill() effects will be undone together. To perform undo and redo, just use:

meEditor->Undo();

and

meEditor->Redo();

Why did I write this class

Actually, the purpose of this class was for me to learn. And I did. As a matter of fact, class programming was a bizarre way of thinking about stuff before, therefore, I decided to start from the basics, and started learning about that. OK, I got the basics, but if you have any comments on how I programmed the class, please let me know. Secondly, I wanted to get familiar with Hungarian notation (all my other projects are big messes), so if you have comments also on that, let me know. And finally, I learned how to use vectors, which I didn't expect to use (actually, I didn't even know what thery were) and they seem to be pretty useful. Another reason for which I decided to write this class, is that I wanted to contribute something hopefully useful to CodeProject.

History

Last Update (15 Oct 2003)

I have fixed some memory leaks issues. Now the class destructor is correct.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

Comments and Discussions

I have implemented a similar item to this. In fact I have a series of classes called Array2D, Array3D, Array4D Etc for image processing, based on the style of the MFC CArray.
What I have been meaning to do for a long while now is to implement a template version that takes the number of dimensions as a template parameter.....
Anyone interested?