#include<iostream.h>
#include<conio.h>
void main()
{
char buffer[max];
clrscr();
ofstream out ("OUTPUT", ios::in|ios::out);
if(!out)
{
cerr<<"Open failed\n";
exit(1);
}
cout<<"Enter a line of data:";
while(cin.get (buffer, max) == eof())
{
put<<buffer <<endl;
cout<< "Next line: ";
}
getch();
}