You are trying to declare a two-dimensional array. It is the simplest form of a multidimensional array.
A two-dimensional array is, in essence, is a list of a one-dimensional array.
Declaration:
To declare a two-dimensional integer array of size x and y you have to write as;
Type arrayname [x][y];
Where type can be any valid C++ data type and arrayName will be a valid C++ identifier.
Two-dimensional array:
A two-dimensional array can be taken as a table, where x represents the number of rows and y represent the columns. So every element in array a is identified by an element name of the firm a[i][j], where a is the name of the array and I and j are the subscripts that uniquely identify each element in a.
Solution:
So the error in your question is that you have not to use the identifier in the initialization of an array. You have declared the variables row and columns as a normal integer type. C++ does not allow nonconstant values for the size of an array. That is the reason, your compiler can not read the code and give the error back.
Code:
The correct code for your example is as follows;
const int row = 5;
const int col = 5;
int array[row][col];
Now I hope you can understand what is the error in your code and how to solve the error in your code.