Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ofstream fontFile;
- fontFile.open (fileName, ios::in | ios::out);
- if(fontFile.is_open()) {
- cout << "file " + fileName + " opened\n";
- while(fontFile.good()) {
- string s;
- getline(cin, s);
- cout << s;
- } // fontFile is good
- fontFile.close();
- cout << fileName +" closed";
- } // if file open
- else
- cout << "Failed to open file: " + fileName;
Add Comment
Please, Sign In to add comment