#include <iostream.h>

class dosstreambase: virtual public ios {
  dosstreambase (void);
  dosstreambase (const char * path, int mode);
  dosstreambase (char drive, const char * path, int mode);
  void open (const char * path, int mode);
  void open (char drive, const char * path, int mode);
  void close (void);
  int setbuf (int size);
};

class idosstream: public dosstreambase, istream {
 public:
  idosstream (void): dosstreambase() { }
  idosstream (const char * path, int mode = ios::in)
  : dosstreambase (path, mode) { }
  idosstream (char drive, const char * path, int mode = ios::in)
  : dosstreambase (drive, path, mode) { }
  void open (const char * path, int mode = ios::in)
  : dosstreambase::open (path, mode) { }
  void open (char drive, const char * path, int mode = ios::in)
  : dosstreambase::open (drive, path, mode) { }
};

class odosstream: public dosstreambase, ostream {
  odosstream (void): dosstreambase() { }
  odosstream (const char * path, int mode = ios::out)
  : dosstreambase (path, mode) { }
  odosstream (char drive, const char * path, int mode = ios::out)
  : dosstreambase (drive, path, mode) { }
  void open (const char * path, int mode = ios::out)
  : dosstreambase::open (path, mode) { }
  void open (char drive, const char * path, int mode = ios::out)
  : dosstreambase::open (drive, path, mode) { }
};

class dosstream: public dosstreambase, iostream {
  dosstream (void): dosstreambase() { }
  dosstream (const char * path, int mode = ios::in|ios::out)
  : dosstreambase (path, mode) { }
  dosstream (char drive, const char * path, int mode = ios::in | ios::out)
  : dosstreambase (drive, path, mode) { }
  void open (const char * path, int mode = ios::in | ios::out)
  : dosstreambase::open (path, mode) { }
  void open (char drive, const char * path, int mode = ios::in | ios::out)
  : dosstreambase::open (drive, path, mode) { }
};
