我想使用从函数返回的二维int数组我应该如何定义函数返回值?我使用int**但是编译器给出了错误:
int** tableCreator(){
int** table=new int[10][10];
for(int xxx=1;xxx<10;xxx++){
for(int yyy=1;yyy<10;yyy++){
table[xxx][yyy]=xxx*yyy;
}
}
return(table); //Here:cannot convert from 'int (*)[10]' to 'int **'
}
Run Code Online (Sandbox Code Playgroud)