Figure 3: A functional that returns the balance from a CUSTOMER_INFO struct

#include<functional>

class Balance : public std::unary_function<CUSTOMER_INFO, double>{
public:
  double operator() (CUSTOMER_INFO& arg) const
    {return arg.dbl_balance;}
};
/* End of File */