我知道如何按照标准方式创建多维数组:
如何创建这样的指针?
const int m = 12;
const int y = 3;
int sales[y][n];
我知道如何创建一个指向一维数组的指针:
int * ms = new int[m];
但是,是否可能创建一个指向多维数组的指针?
int * sales = new int[y][m]; // doesn't work
int * mSales = new int[m]; // ok
int * ySales = new int[y]; // ok
mSales * ySales = new mSales[y]; // doesn't work, mSales is not a type
如何创建这样的指针?