The answer to the first question is
int** myarray;
then in your constructor
RandomClass(int rows, int cols)
{
myarray = new int*[rows];
for (int i = 0; i < rows; ++i)
myarray[i] = new int[cols];
}
The answer to the second question is
vector< vector<int> > myvector;
A 2D vector is simply a vector of vectors, then in your constructor
RandomClass(int rows, int cols) : myvector(rows, vector<int>(cols))
{
}