#include <algorithm>
#include <functional>
#include <iostream>
#include <iterator>

using namespace std;

#define SIZE 42

class Foo{
	bool checked;
public:
	Foo() : checked(false) {}
	void setChecked() { checked = true; }
	bool isChecked() const { return checked; }
};

int main() {
	Foo foos[SIZE] = {};
	
	foos[13].setChecked();
	
	cout << distance(foos, find_if(foos, foos + SIZE, mem_fun_ref(&Foo::isChecked))) << endl;
}