#ifndef SINGLE
//  An adapted ObjectSpace example for use with SGI STL

#include <iostream.h>
#include <algo.h>

#ifdef MAIN
#define ptrbinf1_test main
#endif
static int sum(int x_, int y_)
{
  return x_ + y_;
}
#endif
int ptrbinf1_test(int, char**)
{
  cout<<"Results of ptrbinf1_test:"<<endl;

#ifndef ACORN_CFRONT
int input1 [4] = { 7, 2, 3, 5 };
int input2 [4] = { 1, 5, 5, 8 };
#else
static int input1 [4] = { 7, 2, 3, 5 };
static int input2 [4] = { 1, 5, 5, 8 };
#endif

  int output [4];
  transform(input1, input1 + 4, input2, output,
    pointer_to_binary_function<int, int, int>(sum));
  for(int i = 0; i < 4; i++)
    cout << output[i] << endl;
  return 0;
}
