int ** Data;
int load(int row,int col)
{
Data = new int*[row];
for(i=0;i<row;i++)
{
Data[i] = new int[col];
for(int j=0;j<col;j++)
{
fscanf(file,"%d ",&Data[i][j]);
}
fscanf(file,"\n");
}
}程序执行正确,可是如果我再定义注释里的int ** A,程序编译没有错,可是执行会出错,为什么啊 ,求大侠们指点,在线等~~~~
int load(int row,int col)
{
Data = new int*[row];
for(i=0;i<row;i++)
{
Data[i] = new int[col];
for(int j=0;j<col;j++)
{
fscanf(file,"%d ",&Data[i][j]);
}
fscanf(file,"\n");
}
}程序执行正确,可是如果我再定义注释里的int ** A,程序编译没有错,可是执行会出错,为什么啊 ,求大侠们指点,在线等~~~~
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货