当我调用我的calculatePlaneEQ
函数时,当我重新分配值时,它会引发访问冲突......我的指针生锈了,但似乎这应该可以工作!
float *planeCoefA, *planeCoefB, *planeCoefC, *planeCoefD = NULL;
称呼:
calculatePlaneEQ (<...>, &planeCoefA, &planeCoefB, &planeCoefC, &planeCoefD);
防御:
void calculatePlaneEQ (<...>, float ** myXnorm, float ** myYnorm, float ** myZnorm, float** myD)
{
float xNorm = 1.3;
float yNorm = 1.4;
float zNorm = 1.5;
float eqD = 1.6;
*(*myXnorm) = xNorm;
*(*myYnorm) = yNorm;
*(*myZnorm) = zNorm;
*(*myD) = eqD;
}