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

📄 file_in.txt

📁 Editor C++ 源程序 用链表实现
💻 TXT
字号:
#include"Utility.h"
#include"Lk_list_double.h"
#include"String.h"
#include"Editor.h"


void main(int argc, char *argv[]) // count, values of command-line arguments
/*
Pre:  Names of input and output files are given as command-line arguments.
Post: Reads an input file that contains lines (character strings),
      performs simple editing operations on the lines, and
      writes the edited version to the output file.
Uses: methods of class Editor
*/
{
	char infName[256],outfName[256];

	if (argc < 2) {
		cout << "Please input inputfile name(eg. file_in.txt):";
		cin >> infName;
	}
	else strcpy(infName,argv[1]);
	ifstream file_in(infName);   //  Declare and open the input stream.
	if (file_in == 0) {
		cout << "Can't open input file " << infName << endl;
		exit (1);
	}
	
	if (argc < 3) {
		cout << "Please input outputfile name(eg. file_out.txt):";
		cin >> outfName;
	}
	else strcpy(outfName,argv[2]);
	ofstream file_out(outfName);   //  Declare and open the output stream.
	if (file_out == 0) {
		cout << "Can't open output file " << outfName << endl;
		exit (1);
	}

	Editor buffer(&file_in, &file_out);
	while (buffer.get_command())
		buffer.run_command();
}

⌨️ 快捷键说明

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