I tried to make a 2-D array given the numbers of rows and columns as the user input.
int main(void)
{
int nx, ny;
scanf_s("%d", &nx);
scanf_s("%d", &ny);
int array[nx][ny];
return 0;
}
But VSC is telling me that I must have constants in the parenthesis [].
Is there any way I can convert 'nx' and 'ny' as constant?
Or is there any other way to declare 2-D or N-D arrays without converting their dtype?