pointers - Pass double by reference C++ -
given
double skewangle; how pass variable function , have modified without returning value?
my current function declaration looks this:
mat findcard(mat& baseimage, double *angle) when try findcard(baseimage, *skewangle);
i deceleration not found, can show me how can this?
you're passing variable pointer, not reference, need pass address of variable function, such as:
findcard(baseimage, &skewangle); if want pass reference, need change function declaration to:
mat findcard(mat& baseimage, double& angle) and can pass variable directly function, such as:
findcard(baseimage, skewangle); 
Comments
Post a Comment