📄 main.cpp
字号:
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <process.h>
#include <fstream.h>
#include <iostream.h>
#include "Define.h"
#include "System.h"
#include "Morphology.h"
#include "Error.h"
void Morphology(ofstream File)
{
cout<<"词法分析开始!!"<<endl;
if((FIN=fopen("input.txt","r"))==NULL)
{
cout<<"不能打开输入文件!"<<endl;
exit(0);
}
cout<<"输入文件为"<<"input.txt"<<endl;
if((FOUT=fopen("output.txt","w"))==NULL)
{
cout<<"不能打开输出文件!"<<endl;
exit(0);
}
cout<<"输出文件为"<<"output.txt"<<endl;
File.open("output.txt");
while(fgets(buff,80,FIN)!=NULL)
{
I=0;
while(I<=strlen(buff)-2)
{
Get_A_Word(File);
}
}
fclose(FIN);
fclose(FOUT);
File.close();
cout<<"词法分析完毕!!"<<endl;
}
void main()
{
ofstream File;
Morphology(File);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -