daily pastebin goal
51%
SHARE
TWEET

Untitled

a guest May 16th, 2018 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   ofstream fontFile;
  2.  
  3.   fontFile.open (fileName, ios::in | ios::out);
  4.   if(fontFile.is_open()) {
  5.     cout << "file " + fileName + " opened\n";
  6.     while(fontFile.good()) {
  7.       string s;
  8.       getline(cin, s);
  9.       cout << s;
  10.       } // fontFile is good
  11.     fontFile.close();
  12.     cout << fileName +" closed";
  13.   } // if file open
  14.   else
  15.     cout << "Failed to open file: " + fileName;
RAW Paste Data
Top