#C语言结构体中指针的问题
typedef struct person{
int age;
int* num;
}person;
int a=10;
person C={20,&a};//这里有错误
最后一句代码出错,报错expression must have a constant value
请问为什么这个属性(int* num)不能这样初始化?
#C语言结构体中指针的问题
typedef struct person{
int age;
int* num;
}person;
int a=10;
person C={20,&a};//这里有错误
最后一句代码出错,报错expression must have a constant value
请问为什么这个属性(int* num)不能这样初始化?