before providing a dictionary file


👍 g++ spellCheck.cpp && ./a.out
Cannot open 'dictionary'
👍 echo $?                      
255

👍 cat spellCheck.cpp 
#include <iostream>
#include <fstream>
using namespace std;

int main(int argc, char* argv[]) {
  char fileName[25];
  ifstream dictionary("dictionary");
  if (dictionary.fail()) {
    cerr << "Cannot open 'dictionary'"
         << endl;
    exit(-1);
  }
  return 0;
}

    

ch7.4 Case Study: Spell Checker p373/391 of