⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.cpp

📁 本人自己编写的用于文本编辑开发的小软件
💻 CPP
字号:
/*
我真诚地保证

我自己独立地完成了整个程序从分析、设计到编码的所有工作。

如果在上述过程中,我遇到了什么困难而求教于人,那么,我将在程序实习报告中

详细地列举我所遇到的问题,以及别人给我的提示。

我的程序里中凡是引用到其他程序或文档之处,

我都已经在程序的注释里很清楚地注明了引用的出处。

我从未抄袭过别人的程序,也没有盗用别人的程序,

不管是修改式的抄袭还是原封不动的抄袭。

我编写这个程序,从来没有想过要去破坏或妨碍其他计算机系统的正常运转。

<学生姓名>:刘晖
*/
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//文件名称:WordEdit.cpp                                                                                      //
//项目名称:文本编辑器                                                                                        //
//创建者:刘晖                                                                                                //
//创建时间:2007-10-10                                                                                         //
//最后修改时间:2007-10-20                                                                                    //
//功能:模拟文字处理                                                                                          //
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include<iostream>
#include<string>
#include<fstream>
#include<vector>
#include"Declare.h"	//所有全局变量的定义和所有函数的声明
#include"Input.h"	//从键盘读入文本
#include"Finput.h"	//从文件读入文本
#include"Edit.h"	//文本编辑函数
#include"Print.h"	//页显示函数
#include"Insert.h"	//行插入函数
#include"Delete.h"	//行删除函数
#include"Position.h"//行指针定位函数
#include"Replace.h"	//全文替换函数
#include"Total.h"	//文档统计函数
#include"SaveFile.h"//保存文件
#include"Help.h"	//帮助主题
using namespace std;
void main()
{
	while(1)
	{	//主界面
		system("cls");
		cout<<"|----------------------------------文本编辑器----------------------------------|"<<endl;
		cout<<"|                                                                              |"<<endl;
		cout<<"|                                                                              |"<<endl;
		cout<<"|                                  a.文字输入                                  |"<<endl;
		cout<<"|                                  b.读入文件                                  |"<<endl;
		cout<<"|                                  c.文本编辑                                  |"<<endl;
		cout<<"|                                  d.使用帮助                                  |"<<endl;
		cout<<"|                                  e.退出程序                                  |"<<endl;
		cout<<"|                                                                              |"<<endl;
		cout<<"|                                                                              |"<<endl;
		cout<<"|------------------------------------------------------------------------------|"<<endl;
		string temp;
		cout<<"请选择:";cin>>temp;
		if(temp=="a")
			Input();	//a.文字输入
		else if(temp=="b")
			Finput();	//b.读入文件
		else if(temp=="c")
		{				//c.文本编辑
			ofstream fhis("history.his");
			fhis.close();
			Edit();
		}
		else if(temp=="d")
			Help();		//d.使用帮助
		else if(temp=="e")
			exit(0);	//e.退出程序
		else
			cout<<"操作有误"<<endl;//错误处理
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -