Advertisement
Guest User

Untitled

a guest
Feb 14th, 2016
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. using std::cout;
  4. using std::endl;
  5. using std::cin;
  6. using std::string;
  7. using std::vector;
  8.  
  9. #include <sys/select.h>
  10. class Test{
  11. public:
  12. void member_func(){
  13. cout << "i'm a member function!" << endl;
  14. }
  15. };
  16.  
  17. template<class A> void
  18. test(void (A::*m)()){
  19. Test t1;
  20. (t1.*m)();
  21. }
  22.  
  23.  
  24. int main(){
  25. Test t;
  26. test(&Test::member_func);
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement