📄 wb2.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();
}
/*去掉相同的记录*/
/****************************************
winwb98.ttt===>winwb98.ttx (by windows tools, sorting by aphabic)
This sub can get rid of the same record
winwb98.ttx==>winwb98.txx
****************************************/
void make_wb2(void)
{
CHR buf[256];
CHR buf1[256];
CHR i;
stream_father = fopen("winwb98.ttx","rt"); /*text*/
if(stream_father ==NULL)
{
printf("Error: winwb98.ttx not find!\n");
return;
}
stream_sonx= fopen("winwb98.txx","wt");
if(stream_sonx==NULL)
{
printf("Error: winwb98.txx not creat ! \n");
return;
}
while (!feof(stream_father))
{
fgets(buf,200,stream_father);
for(i=0;i<200;i++)
{
if(buf1[i]!=buf[i]) break;
}
if(i!=200) /*diffent*/
{
for(i=0;i<200;i++)
{
buf1[i]=buf[i];
}
fprintf(stream_sonx,"%s",buf);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -