Home > Back-end >  A two-dimensional array
A two-dimensional array

Time:10-05

C99 can define a 2 d array, isn't it? Why this doesn't work?
Int main ()
{int n; Cin> n; Double a [n] [n]={0}. for(int i=0; i A, [I] [j]. } cout}

CodePudding user response:

Should because n is a variable



CodePudding user response:

C language array length must be a constant value, does not support variables

CodePudding user response:

Can use variable-length array depends on how much your compiler support for c99,
  • Related