int **p; p = new int*[x]; //行 //申请行的空间 //每行的列申请空间 for(i=0; i<x;i++) { p[i] = new int [y]; }
转载自snow博客http://blog.sina.com.cn/u/2080848525