#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();
}
myowndream
- 粉丝: 1
- 资源: 2
最新资源
- 1Cr18Ni9Ti钢板焊接接头冷弯开裂的试验研究.pdf
- 1Cr18Ni9Ti钎焊接头组织和性能影响研究 - .pdf
- 2.25 Cr-1 Mo钢制加氢反应器的焊接裂纹(二)-对焊接裂纹性质的试验研究.pdf
- 1Crl8Ni9Ti不锈钢复合管系的焊接 - .pdf
- 2.25Cr-1Mo-0.25V低合金钢用焊接材料的检验 - .pdf
- 2.25-1Mo钢焊后产生焊接裂纹的原因分析及其返修措施.pdf
- 2.25 Cr-1 Mo钢制加氢反应器的焊接裂纹(一)-在制过程中出现的焊接裂纹.pdf
- 2.25Cr-1Mo-0.25V钢焊接材料的再热裂纹敏感性试验方法探讨.pdf
- 2A12厚板铝合金搅拌摩擦焊接头组织性能研究 - .pdf
- 2万立立式液氢高压容器的焊接研制.pdf
- 2A14铝合金法兰焊接裂纹修复.pdf
- 3.5%Ni钢焊接接头的低温韧性研究三──熔敷金属碳含量等因素的影响.pdf
- 3.5%Ni钢焊接技术的最近进展.pdf
- 3.5%Ni钢焊接接头低温韧性的研究二──焊后热处理母材及焊材的影响.pdf
- 3.5%Ni钢焊接接头低温韧性的研究一──线能量层间温度的影响.pdf
- 3.5Ni钢低温设备的制造和焊接.pdf
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
- 1
- 2
前往页