69,381
社区成员
发帖
与我相关
我的任务
分享
ldouble *rval;
ldouble *temp = (ldouble *)calloc( 2 * size * size, sizeof( ldouble));
ldouble *tptr = temp;
ldouble *tptr1, *tptr2;
/*
这里有一大段复杂的计算……
*/
rval = (ldouble *)calloc( size * size, sizeof( ldouble));
if( rval) /* copy the right-hand half of 'temp', which */
{
/* now has the inverse we wanted */
double xxx;
tptr1 = rval;
for( i = 0; i < size; i++)
for( j = 0; j < size; j++)
{
*tptr1++=temp[(i * 2 + 1) * size + j]; //运行到这句出错,后来为了验证,我改成下面的写法
xxx= temp[(i * 2 + 1) * size + j];
*tptr1= xxx;// 这句出错
tptr1++;
}
}