//#include "stdafx.h"//vc++6.0加上这一行.
#include "
stdio.h"
#include "
stdlib.h"
int main(void){
FILE *fp;//声明文件指针
int i=0,j,x;//声明循环
控制变量i、j和接收int型数据变量x
char str[65][26],a,b,c,d,e,f;//声明接收
字符串数组str和输出临时变量a~f
if((fp=fopen("123.csv","r"))==NULL){//打开文件
printf("Open the file failure...\n");
exit(0);
}
while(fgets(str[i++],27,fp),!feof(fp));//文件内容以字符串形式读入数组str
for(i--,j=0;j<i;j++){//打出来看看……
sscanf(str[j],"%c %c %c %d %c %c %c%*[\n\0]",&a,&b,&c,&x,&d,&e,&f);
printf("%c %c %c %d %c %c %c\n",a,b,c,x,d,e,f);
}
fclose(fp);
return 0;
}