#include #include using namespace std; int main() { ifstream inFile; // read the file we wrote in writefile.cc inFile.open("summary.txt", ios_base::in); if (inFile.is_open()) { cout << "Beginning to read file summary.txt" << endl << endl; string lineIn; while (inFile) { getline(inFile, lineIn); // read entire line at a time if (lineIn.length() > 0) // final read attempt will return a blank line cout << lineIn << endl; // print line if not empty } inFile.close(); cout << endl << "Done reading from file!" << endl; } else { cout << "Error: Could not open file for reading." << endl; } return 0; }