Click here to Skip to main content
15,891,777 members
Please Sign up or sign in to vote.
1.00/5 (6 votes)
See more:
Hi
I need a source code for a very simple word processor,
That can perform operations undo/redo.
it's very important that do it uses class of stack

thx

[edit] added the homework tag[/edit]
Posted
Updated 31-May-11 8:06am
v5
Comments
Sander Rossel 31-May-11 13:14pm    
Good luck with that...
Sergey Alexandrovich Kryukov 31-May-11 13:23pm    
Yes, I can imagine...
Good luck.
--SA
[no name] 31-May-11 13:24pm    
I agree :)
Sander Rossel 31-May-11 13:33pm    
The agree'ers are stacking, that is one issue solved ;)
Sergey Alexandrovich Kryukov 31-May-11 13:28pm    
Nevertheless, I decided to answer. Please see.
--SA

"It's very important that do it uses class of stack." I see. When some specific technique is required instead of functional requirements, it's a good sign of a school assignment. It this the one?

We're not really interested in doing your job for you. What's even more important, you are not really interested yourself in someone doing your job for you. Please understand that doing your assignments by yourself is much more important that getting school credit for your work.

At the same time, if you do your work and face some problems, you can get some valuable help. If happens all the time here on CodeProject.

—SA
 
Share this answer
 
v2
Comments
Marc A. Brown 31-May-11 13:29pm    
Excellent response. Deserves more than the single '5' I can give it.
Sergey Alexandrovich Kryukov 31-May-11 13:53pm    
Thank you, Marc.
--SA
CPallini 31-May-11 13:54pm    
Say it, say it, go Sergey, go!
Sergey Alexandrovich Kryukov 31-May-11 13:59pm    
I do, I do!
Thank you very much.
--SA
Joan M 31-May-11 14:06pm    
Perfect, correct, nice, ideal answer... 5.
Here's a short outline to go by:

1. Check your IDE help to find out how to create a SDI (single document interface) or MDI (multiple document interface) application. Adding a big edit box shouldn't be too hard either.

2. Add an existing version of a stack such std::stack, or implement your own.

3. You can use the stack to save individual changes. This will help with your undo function. Think about what it takes to identify an individual change, and how you can capture it.

4. redo requires additional work, as you cannot simply discard the actions you've undone.

If you have any further questions you are welcome to ask, but at least write some code first and try for yourself before calling for help.
 
Share this answer
 
You can easily find open source editors using google.
Look here[^] for one example.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900