Error: initializer element is not computable at load time

This is illegal in C. Initializer lists must be constant compile time expressions. Do the following instead:

int prm_arr[3];

prm_arr[0] = prm.field1;
prm_arr[1] = prm.field2;
prm_arr[2] = prm.field3;

Leave a Comment