The following line doesn't work:
int n1=10,v1=10;
int f[n1][v1]={};
error: variable-sized object ‘f’ may not be initialized
But the line below works, why?
const int n1=10,v1=10;
int f[n1][v1]={};
Array initializers need to be const.
An int value can change where as a const int value will remain constant throughout the entire program.
fis a variable-length array. Those cannot be initialised. In the second, it's not a VLA, hence can be initialised.