struct st1*pst1; //问题在这句,这个指针pst1指向的类型是st1,而不是st,所以pst1 = &st1是不可以的,自然 pst1->num也就不对了#includestruct st{ int num;}st1 = { 1 }, st2;struct st*pst1; //是st*,而不是st1*void main() { pst1 = &st1; //放在局部,全局区是不能赋值的 printf("%d", pst1->num);}