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

📄 infile.txt

📁 前些天写了个小语言的词法分析程序
💻 TXT
字号:
#include<string.h>
#include<stdio.h>
#include<process.h>
const int max=40;

void main()
{
	FILE *in,*out;
	string chars[max];
	char c;
	if(in==fopen("e:\\test.txt","r"))//
	{
		printf("cannot find the file!!\n");
		exit(0);
	}
	if(out==fopen("e:\\output.txt","w"))//
		printf("cannot create the file\n");
		exit(1);
	}
	int k,i;
	c=fgetc(in);
	while(c!="@")
	{
		if((c>='a'&&c<='z')||(c>='A'&&c<='Z')
		 ||(cr>='0'&&c<='9')||c=='('||c==')'
		 ||c=='{'||c=='}'||c=='>'||c=='<'
		 ||c==';'||c==':'||c=='+'||c=='-'
		 ||c=='*'||c=='/'||c=='='||c=='!'
		 ||c=='&'||(k=c)=='\n'||c==' '||c=='['||c==']')
		{
			i=0;
			chars[i++]=c;

		}
			
	}
}@

⌨️ 快捷键说明

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