C++ (Qt)retval = add_ptr( (void*)&mvardel );
C++ (Qt)#include <iostream> using std::cout;using std::endl; void f(int, int) {} int add_ptr(void* f) { return reinterpret_cast<int>(f);} int main() { cout<<add_ptr((void*)&f)<<endl;}
C++ (Qt)template<class to_t, class from_t> to_t force_cast(from_t t){ union { to_t to; from_t from; } cvt; cvt.from = t; return cvt.to;} void f() {} int main(){ void (*pf)() = &f; void *p = force_cast<void* >(pf);......
retval = add_ptr( (void*) &mvardel );