/*
The following program reads the name of an input file and then 
it prints the contents of the file on the screen exactly as they 
look like in the file.
 */
#include <iostream>
#include <string>
#include <fstream>
using namespace std;

int main()
{
	ifstream inputFile;
	string inputFileName, line;
	cout << "Enter the name of the input file: ";
	cin >> inputFileName;
	inputFile.open(inputFileName.c_str());
	if (!inputFile)
	{
		cout << "Can't open the file." << endl;
		return 1;
	}
	getline(inputFile,line);
	while (inputFile)
	{
		cout << line << endl;
		getline(inputFile,line);
	}
	inputFile.close();
	return 0;
}
