初级会员

- 积分
- 137
- 金钱
- 137
- 注册时间
- 2013-10-2
- 在线时间
- 20 小时
|
我在 39 实验 FATFS实验工程下,fattester.c 文件中添加一个格式化读写函数fscanf来读TXT文件的内容的函数,目的就是检测一下能否将10个学生的信息以制表符间隔开打印,但编译时提示错误:
..\OBJ\FATFS.axf: Error: L6200E: Symbol __stdout multiply defined (by stdio_streams.o and usart.o).
函数定义如下:
int ReadTxt(char *path){
typedef struct student{
char name[32];
int no;
char sex[16];
float score;
} stu;
FILE * r=fopen(path, "r");
stu a[10];
int i=0;
while(fscanf(r,"%s%d%s%f",a.name,&a.no,a.sex,&a.score)!=EOF)
{
printf("%s\t%d\t%s\t%g\n",a.name,a.no,a.sex,a.score);
i++;
}
fclose(r);
return 0;
}
请求帮助!!
|
|