C++ : function adress/ Variable adress
Hi LQ,
I have a question regarding function adress. Maybe it is easier to understand my problem with a bit of code: Code:
Code:
Why do I get a simple '1' for the function adress when not casted to couble? (while I get an hex adress for a variable). Also, why is it the same result for all the function (I did it here with the main, but if I had another function, I get the same results). Is it machine specific, is it that I did something wrong, or is it something I didn't understand? Cheers, Loic. |
The function pointer is interpreted as a bool when passed to the ostream object. You can verify this with:
Code:
#include <iostream> |
All times are GMT -5. The time now is 04:23 AM. |