infile.txt

来自「前些天写了个小语言的词法分析程序」· 文本 代码 · 共 38 行

TXT
38
字号
#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 + =
减小字号Ctrl + -
显示快捷键?