结构指针问题,请教如下为何没有内容输出?
#include <stdio.h>typedef struct {
float x, y;
} VecR;
VecR *p;
int main() {
int n;
for(n=0; n<10;n++) {
p[n].x = 1.;
p[n].y = 2.;
}
printf("%f",p[0].x);
return 0;
}
2022-11-20 17:22
2022-11-20 17:44
2022-11-20 17:50
2022-11-21 09:30
2022-12-04 22:50