diff --git a/ch17/ex17.22/ex17.22/main.cpp b/ch17/ex17.22/ex17.22/main.cpp index bdde81b3..2dcf60d1 100644 --- a/ch17/ex17.22/ex17.22/main.cpp +++ b/ch17/ex17.22/ex17.22/main.cpp @@ -53,10 +53,10 @@ int main() vector people; string filename; - //cout << "Please input a record file name: "; - //cin >> filename; - //cout << endl; - ifstream fin(".//test.txt"); + cout << "Please input a record file name: "; + cin >> filename; + cout << endl; + ifstream fin(filename); if (fin.is_open()) { @@ -128,4 +128,4 @@ void format_record(ostream& os, const string& phones, PersonInfo& people) else //! otherwise, print the name and bad numbers cerr << "input error: " << people.name << " invalid number(s) " << badNums.str() << endl; -} \ No newline at end of file +}