标签:小代码
#include <stdio.h>
#include <stdlib.h>
int use() {
FILE *xxxFile = fopen("xxx.txt", "rb");
FILE *yyyFile = fopen("yyy.txt", "wb");
char c;
while((c=getc(xxxFile))!=EOF)
{
if(c==‘?‘)putc((char)32,yyyFile);
else putc(c,yyyFile);
}
puts("文件已处理好~~");
fclose(xxxFile);
fclose(yyyFile);
}
int main() {
char x=0;
puts("1. 请准备一份仅需要处理?符号的文件 命名为 xxx.txt");
puts("2. 文件准备思路为 用html对文本展示 特殊字符会出现?");
puts(" 其余正常,生成文件为 yyy.txt");
puts("3. 准备好后,按下常用键即可运行(esc等除外)");
x=getchar();
use();
system("pause");
return 0;
}标签:小代码
原文地址:http://wzsts.blog.51cto.com/10251779/1792791