#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <malloc.h>
// 删除注释
void Pack(FILE *src, FILE *dst);
int main()
{
char sname[1024], dname[1024];
FILE *sfile, *dfile;
gets(sname);
gets(dname);
sfile = fopen(sname, "rb");
if (!sfile)
{
printf("%s 无法打开!\n", sfile);
}
dfile = fopen(dname, "wb");
if (!dfile)
{
printf("%s 无法打开!\n", dfile);
}
if (sfile && dfile)
{
printf("正在整理...");
Pack(sfile, dfile);
puts("整理完成!");
}
if (sfile)
{
fclose(sfile);
}
if (dfile)
{
fclose(dfile);
}
return 0;
}
void Pack(FILE *src, FILE *dst)
{
#define IN_MULTI 1
#define IN_SINGLE 2
#define IN_SINGLE_QUOT 4
#define IN_QUOT 3//在字符串
int i = 0,j,k,state = 0;
char *str = (char *)malloc
请你编写一个函数,将C语言源程序中的注释全部删去。
最新推荐文章于 2021-05-03 20:03:59 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)