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

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -