#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main() {
string filename;
string line;
ifstream inputFile;
cout << "Enter the file name (with extension): ";
cin >> filename;
inputFile.open(filename);
if (!inputFile) {
cout << "Error: Unable to open the file." << endl;
return 1;
}
cout << "\n--- File Content ---\n" << endl;
while (getline(inputFile, line)) {
cout << line << endl;
}
inputFile.close();
return 0;
}