#include<iostream>
#include<fstream>
using namespace std;
int main() {
ofstream out("out.txt");
if (out.is_open())
{
out << "This is a line.\n";
out << "This is another line.\n";
out << "This is another line.\n";
out << "This is another line.\n";
out << "This is another line.\n";
out.close();
}
ifstream in("out.txt");
char buffer[256];
while (!in.eof())
{
in.getline(buffer, 100);
cout << buffer << endl;
}
cin.get();
return 0;
}