- 注册时间
- 2004-10-13
- 最后登录
- 1970-1-1
|
#include<stdio.h>
struct student
{
int num;
char *name;
float score_c;
float score_j;
}stu[3]={{1,"李芳",80,70},{2,"于红",90,90},{3,"万达成",70,60}};
void main()
{
int i;
struct student *p;
p=stu;
<----------->为什么我把int i; 放到这个位置来就会出错呢?原因是什么呢?
for(i=0;i<3;i++,p++)
printf("学号:%d\n",(*p).num);
} |
|