In plain C, when initializing a matrix you can do it:
int m[2][2] = { {2,3} , {3,4} };
but I am trying to do it at run time:
And I get compiling errors. It looks like this way is not allowed.Code:int F[5][8];
int main()
{
int x= 1;
F[x] = {-6, -3, 0, 4, 8, 6, 2, -4 };
int x= 2;
F[x] = {-7, -3, 0, 5, 8, 6, 2, -8 };
.....
return 0;
}
Is there any way to inialize a matriz in bulk, so that there is no need to initialize values one by one.
thanks