ifstream reader; do { string location = ""; cout << "Enter the location of the file: "; cin >> location; reader.open(location); } while (!reader);
Standard input is empty
prog.cpp:1:4: error: 'ifstream' does not name a type ifstream reader; ^ prog.cpp:2:4: error: expected unqualified-id before 'do' do ^ prog.cpp:9:4: error: expected unqualified-id before 'while' while (!reader); ^
Standard output is empty