{
public:
uintptr_t test() {
// Address of member function test(), is the value of &A::test
printf("Address of function is: 0x%p\n", &A::test);
uintptr_t address = (uintptr_t)(&A::test);
return address;
}
};
int main() {
A a;
std::cout<<"Address of function is: "<<std::showbase<<std::hex<<a.test()<<std::endl;
Did you already post the solution to your question? 🤔
Обсуждают сегодня