调试一直报错,程序应该没问题,是我的编辑器的问题吗
#include<stdio.h>struct birthday{
int year;
int month;
int day;
};
struct address{
char city;
char street;
int code;
};
struct friends{
char name[10];
struct birthday date;
char telephone[13];
struct address addr;
};
int main(){
int i, j, max;
struct friends f[5], e; //5个人的小通讯名单
for(i=0; i<5; i++){
printf("输入第%d个朋友的信息:\n", i+1);
scanf("%s%d%d%d%s%s%s%d", &f[i].name, &f[i].date.year, &f[i].date.month, &f[i].date.day,
&f[i].telephone, &f[i].addr.city, &f[i].addr.street, &f[i].addr.code);
}
for(i=0; i<5; i++)
printf("%s %d-%d-%d\n%s\n%s %s %d", f[i].name, f[i].date.year, f[i].date.month, f[i].date.day,
f[i].telephone, f[i].addr.city, f[i].addr.street, f[i].addr.code);
}辛辛苦苦输完数据打算测试程序跑的怎样的,一直报错,是哪里的问题呢???