#include <iostream>
using namespace std;

struct foo
{
	int min(int a, int b) { return a < b ? a : b; }
	int max(int a, int b) { return a > b ? a : b; }
};

typedef int(foo::*function_type)(int, int);

void processor(function_type func, foo* object)
{
	std::cout << "1 and 2 = " << (object->*func)(1, 2) << std::endl;
	std::cout << "5 and 2 = " << (object->*func)(5, 2) << std::endl << std::endl;
}

int main() 
{
	foo f;
	
	processor(&foo::min, &f);
	processor(&foo::max, &f);
	
	return 0;
}