Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. vector<string> fileParse(vector<string> & inputStrings, string & fileName) {
  2. ifstream x;
  3. x.open(fileName);
  4. cout << "attempting to open file" << endl;
  5. if (!x.is_open()) {
  6. cout << "Bad input file name. Input was: " << fileName << endl;
  7. throw lab0badInput;
  8. }
  9. else {
  10. string temp;
  11. while (x >> temp) {
  12. inputStrings.push_back(temp);
  13. }
  14. x.close();
  15. }
  16. return inputStrings;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement