📄 wb6.c
字号:
#include <stdio.h>
#include <stdlib.h>
#include <float.h>
#include <graphics.h>
#include <math.h>
#include <conio.h>
#include <string.h>
#define NG 1
#define OK 0
#define BCD unsigned char
#define CHR unsigned char
#define INT unsigned int
#define PTR long
FILE *stream_father;
FILE *stream_son;
FILE *stream_sonx;
void make_wb2(void);
void main(void)
{
make_wb2();
}
/*相同的汉字有不同的编码,我们进保留该汉字的最简单形式的编码,也就是最少笔画*/
/****************************************
YYY.TXT==>ZZZ.TXT
****************************************/
void make_wb2(void)
{
CHR buf[256];
CHR buf1[256];
CHR i;
CHR hz1[3];
CHR hz2[3];
hz1[2]='\0';
hz2[2]='\0';
stream_father = fopen("YYY.txt","rt"); /*text*/
stream_sonx= fopen("zzz.txt","wt");
while (!feof(stream_father))
{
fgets(buf,200,stream_father);
hz1[0]=buf[0];
hz1[1]=buf[1];
if(hz1[0]!=hz2[0] ||hz1[1]!=hz2[1])
{
hz2[0]=hz1[0];
hz2[1]=hz1[1];
fprintf(stream_sonx,"%s",buf);
}
}
fclose(stream_son);
fclose(stream_sonx);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -