Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

[C++] distinguish reference/value

$
0
0
Hi, dudes. I try to write function-wrapper for retrieving float values in C++. Something like:

Code:

float GetFloat(AMX * amx, cell * params, int i);
I want it to work equally well when a floating-point number is passed by value or by reference:

Code:

native my_func(Float:f);
native his_func(&Float:f);

How do I know if a floating-point number was passed by value or by reference?

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>