I have a function that takes a struct, and I'm trying to store its variables in array:
int detect_prm(Param prm) {
int prm_arr[] = {prm.field1, prm.field2, prm.field3};
return 0;
}
But with gcc -Wall -ansi -pedantic-errors -Werror
I get the following error:
initializer element is not computable at load time
It looks fine to me, what's wrong?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…