#include <iostream>
using namespace std;

struct A
{
	void (A::*ptr)();
	
	void foo() { cout << "asd" << endl; }
	void bar()
	{
		ptr = &A::foo;
		
		(this->*ptr)();
	}
};

int main() {
	A a;
	a.bar();
	return 0;
}