Created
February 12, 2019 02:19
-
-
Save devendranaga/ae14e8148c462c441a495f738b6b9581 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
void (*mem_fun_cb)(void); | |
class mem_fun { | |
private: | |
public: | |
mem_fun() { } | |
~mem_fun() { } | |
void my_public_member_f() { | |
std::cout << "called " << std::endl; | |
} | |
}; | |
int main() | |
{ | |
mem_fun m; | |
m.my_public_member_f(); | |
mem_fun_cb = m.my_public_member_f; | |
mem_fun_cb(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment