其中的一段代码:<stdio.h>
FILE *fp;
char data[100];
int i=0,ch = 0;
fp = fopen("coor.txt","r");
if(fp == NULL)
{
printf("open file error");
return;
}
while(!feof(fp))
{
ch = fgetc(fp);
if(ch == ';')
data[i]='#';
else
{
data[i]=ch;
}
i++;
}
for(int j=0;j<sizeof(data);j++)
{
printf("%c",data[j]);
}
printf("/n");
char buff[10];
sscanf(data,"%[^,]",buff);
printf("%s",buff);