有这么一段程序:
void coe::fncoefficientF(double ***FXI,double ***FYI,double ***FZI,double coeRO,double coeDif) //coefficients for variables, such as u,v,T, etc.
{
int i,j,k;
for(i=1;1<=L1;i++)
{
for(j=1;j<=M2;j++)
{
for(k=1;k<=N2;k++)
{
FLOWX[i][j][k]=FXI[i][j][k]*coeRO*AREX[i][j][k];
cout<<"coeRO"<<coeRO<<endl; cout<<"AREX"<<i<<"]"<<"["<<j<<"]"<<"["<<k<<"]"<<AREX[i][j][k]<<endl;
cout<<"FXI["<<i<<"]"<<"["<<j<<"]"<<"["<<k<<"]"<<FXI[i][j][k]<<endl;
cout<<"FLOWX"<<i<<"]"<<"["<<j<<"]"<<"["<<k<<"]"<<FLOWX[i][j][k]<<endl;
cout<<endl;}
}
}
for(i=1;i<=L2;i++)
{
for(j=1;j<=M1;j++)
{
for(k=1;k<=N2;k++)
FLOWY[i][j][k]=FYI[i][j][k]*coeRO*AREY[i][j][k];
}
}
中间的输出语句是我调试的时候使用的。
double ***FXI,double ***FYI,double ***FZI,double coeRO,double coeDif 是函数的形参。
不知道怎么回事,如果我输出FLOWY[i][j][k],就是第二个循环计算出来的变量,计算就出错。但是输出FLOWX[i][j][k]就没事。
debug时出现了这样的错误提示信息
Loaded 'ntdll.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found.
The thread 0xAB4 has exited with code 0 (0x0).
The thread 0xFEC has exited with code 0 (0x0).
First-chance exception in test1.exe: 0xC0000005: Access Violation.
First-chance exception in test1.exe: 0xC0000005: Access Violation.
The program 'E:\我的工作\program\test1\Debug\test1.exe' has exited with code 0 (0x0).
还往哪位高手能够帮我解决一下!多谢了!