#include <iostream>
class Hoge {
public:
void f() { std::cout << "hoge" << std::endl; }
};
int main() {
// ordinary
Hoge *hoge = new Hoge();
hoge->f();
// via function-address
void (Hoge::*private_f)() = &Hoge::f;
(hoge->*private_f)();
delete hoge;
}
/* end */
I2luY2x1ZGUgPGlvc3RyZWFtPgoKY2xhc3MgSG9nZSB7CnB1YmxpYzoKICB2b2lkIGYoKSB7IHN0ZDo6Y291dCA8PCAiaG9nZSIgPDwgc3RkOjplbmRsOyB9Cn07CgppbnQgbWFpbigpIHsKLy8gb3JkaW5hcnkKICAgIEhvZ2UgKmhvZ2UgPSBuZXcgSG9nZSgpOwogICAgaG9nZS0+ZigpOwovLyB2aWEgZnVuY3Rpb24tYWRkcmVzcwogICAgdm9pZCAoSG9nZTo6KnByaXZhdGVfZikoKSA9ICZIb2dlOjpmOwogICAgKGhvZ2UtPipwcml2YXRlX2YpKCk7CiAgICBkZWxldGUgaG9nZTsKfQovKiBlbmQgKi8K