Yes. (better and possible!)
int x[100]; //100 variables, not a "variable" number, but maybe useful for you!
int *px = new int[n];// n variables, n is known at runtime;
//best
std::vector<int> ints; //best, recommended!
Read about std::vector
here:
http://www.cplusplus.com/reference/stl/vector/
See also std::list
and other STL containers!
EDIT:
For multidimensional, you can use this:
//Approach one!
int **pData = new int*[rows]; //newing row pointer
for ( int i = 0 ; i < rows ; i++ )
pData[i] = new int[cols]; //newing column pointers
//don't forget to delete this after you're done!
for ( int i = 0 ; i < rows ; i++ )
delete [] pData[i]; //deleting column pointers
delete [] pData; //deleting row pointer
//Approach two
vector<vector<int>> data;
Use whatever suits you, and simplifies your problem!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…