fork download
  1. ifstream reader;
  2. do
  3. {
  4. string location = "";
  5. cout << "Enter the location of the file: ";
  6. cin >> location;
  7. reader.open(location);
  8. }
  9. while (!reader);
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
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);  
    ^
stdout
Standard output is empty