#include #include #include using namespace std; int main() { ofstream file("test.txt"); file << "A \"Hello, World!\" program is generally a simple computer program \n" << "which outputs (or displays) to the screen(often the console) a \n" << "message similar to \"Hello, World!\" while ignoring any user input." << endl; file.close(); string line; ifstream file2("test.txt"); while (getline(file2, line)) { cout << line << endl; } file2.close(); return 0; }