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

C# random value from dictionary and tuple -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -

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