//#define mem_fun1 mem_fun
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <functional>
class Person {
private:
std::string name;
public:
//...
void print () const {
std::cout << name << std::endl;
}
void printWithPrefix (std::string prefix) const {
std::cout << prefix << name << std::endl;
}
};
void foo (const std::vector<Person>& coll)
{
using std::for_each;
using std::bind2nd;
using std::mem_fun_ref;
}
...Joking... I have no idea what this does
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <functional>
class Person {
private:
std::string name;
public:
//...
void print () const {
std::cout << name << std::endl;
}
void printWithPrefix (std::string prefix) const {
std::cout << prefix << name << std::endl;
}
};
void foo (const std::vector<Person>& coll)
{
using std::for_each;
using std::bind2nd;
using std::mem_fun_ref;
}
...Joking... I have no idea what this does