入出力をつなげてみる

#include <iostream>
#define BUFSIZE 256

using namespace std;

istream &operator>>(istream &in, ostream &out) {
  char buf[BUFSIZE];
  streamsize n;

  do {
    in.read(buf, BUFSIZE);
    n = in.gcount();
    out.write(buf, n);
  } while (n >= BUFSIZE);

  return in;
}

int main() {
  cin >> cout;
  return 0;
}