#include #include #include using namespace std; void OpenFile(ifstream & file); void GetBlank(void); void ProcessLine(void); int main() { ifstream inFile; // open the file OpenFile(inFile); // read the four blank values from the file GetBlank(); GetBlank(); GetBlank(); GetBlank(); // tell the story // get a line // while (not end of file) { ProcessLine(); // get a line // } return 0; } void OpenFile(ifstream & file){ string fileName; bool fileOpen = false; while (not fileOpen) { cout << "Enter the name of a madlib file => "; cin >> fileName; cin.ignore(100,'\n'); cout << endl; cout << "Attempting to open " << fileName << endl; file.open(fileName.c_str()); if (file) { cout << "Success " << endl; fileOpen = true; } else { cout << "Unable to open " << fileName << endl; } cout << endl << endl; } return; } void GetBlank(void){ cout << "In Get Blank " << endl; return; } void ProcessLine(void){ cout << "In Process Line" << endl; return; }