恳请指教
我在用VC++.net开发程序(ok.exe)的时候遇到了这样一个问题:
float **textureDataX,**textureDataY,**textureDataZ,**textureDataC;
int w,h;
w=32,h=32;
textureDataX=(float**)malloc(w);
textureDataY=(float**)malloc(w);
textureDataZ=(float**)malloc(w);
textureDataC=(float**)malloc(w);
for(int x=0;x<w;x++)
{
textureDataX[x]=(float*)malloc(h);
textureDataX[x]=(float*)malloc(h);
textureDataX[x]=(float*)malloc(h);
textureDataX[x]=(float*)malloc(h);
}
for(int x=0;x<w;x++)
for(int z=0;z<h;z++)
{
textureDataX[x][z]=w;
textureDataY[x][z]=w+h;
textureDataZ[x][z]=h;
textureDataC[x][z]=w-h;
}
编译通过,在程序运行的时候出现如下错误信息:OK.exe 中的 0x00412a4f 处未处理的异常: 0xC0000005: 写入位置 0x186fe000 时发生访问冲突 。不知如何解决,盼请指教。