#include <iostream>
#include <functional>

using namespace std;

void inc(int& n) { n++; }
int main() {
  int i = 0;
  function<void()>
    do_inc = bind(inc, ref(i));

  cout << i << endl;
  do_inc();
  cout << i << endl;
}
