Usin a RAW value of a variable.

And then you try to invoke the function with an int* as the first argument.

No. OP is invoking the function with the address of a variable. The address of a variable is not the same as a pointer to the variable.