Category : Files from Magazines
Archive   : CUJ9201.ZIP
Filename : 1001127B

 
Output of file : 1001127B contained in archive : CUJ9201.ZIP

#include
#include


class Conbuf : public streambuf
{
int do_sputn(const char *s,int n);
int overflow(int=EOF);
} conbuf;

int Conbuf::overflow(int c)
{
do_sputn((char *)&c,1);
return 1;
}

int Conbuf::do_sputn(const char *s,int n)
{
int n1=n;
while (n1--)
{
putch(*s);
if (*s++=='\n')
{
putch('\r');
clreol();
}
}
return n;
}

ostream conout=&conbuf;