Hello to all,
does anyone have a good reference about adaptor function tutorial including example and explanation.
Thanks.
Hello to all,
does anyone have a good reference about adaptor function tutorial including example and explanation.
Thanks.
>> does anyone have a good reference about adaptor function tutorial including example and explanation.
Well, an adaptor simply means an object that wraps another to match some sort of interface requirement. Pretty basic idea, really.
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
Yes, i looking for example code/Usage in ptr_fun, mem_fun, mem_fun_ref.
I hope you can teach me.
Thanks.
Last edited by Peter_APIIT; 07-22-2009 at 12:18 AM.
>> I hope you can teach me.
If you have any specific questions I would be glad to answer them, but I'm not going to play "teach me" with you. If you want to learn more about this sort of thing I would recommend Google as a starting point.
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }