一个非常简单的文字处理器的源代码 [英] source code for a Very simple word processor

查看:129
本文介绍了一个非常简单的文字处理器的源代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我需要一个非常简单的文字处理器的源代码,
可以执行撤消/重做操作.
使用堆栈类非常重要

thx

[edit]添加了作业标签[/edit]

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]

推荐答案

使用堆栈类非常重要."我懂了.当需要某种特定技术而不是功能要求时,这是学校作业的一个好兆头.是这个吗?

我们对为您完成工作并不真正感兴趣.更重要的是,您对某个为您工作的人并不真正感兴趣.请了解,独自完成作业比获得学校功劳更重要.

同时,如果您在工作中遇到了一些问题,则可以获得一些宝贵的帮助.如果一直在这里发生在CodeProject上.

—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


下面是一个简短的概述:

1.检查您的IDE帮助,以了解如何创建SDI(单个文档界面)或MDI(多个文档界面)应用程序.添加一个大的编辑框也不应该太难.

2.添加现有的堆栈版本,例如 std :: stack ,或实现自己的堆栈.

3.您可以使用堆栈来保存单个更改.这将有助于您的撤消功能.考虑一下识别单个变更所需的时间,以及如何捕获它.

4.重做需要额外的工作,因为您不能简单地放弃已撤消的操作.

如果您还有其他问题,欢迎您提出,但是至少请先编写一些代码,然后尝试自己,然后再寻求帮助.
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.


您可以使用google轻松找到开源编辑器. br/> 在此处查看[ ^ ].
You can easily find open source editors using google.
Look here[^] for one example.


这篇关于一个非常简单的文字处理器的源代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆