如图所示,结构体语法应该没问题,为啥会报错?
对结构体变量属性的赋值要在函数中进行不能在函数外
#include<stdio.h> #include<stdlib.h> struct aa{ int num; }; struct aa k; void main() { k.num = 0; }