Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- vector<string> fileParse(vector<string> & inputStrings, string & fileName) {
- ifstream x;
- x.open(fileName);
- cout << "attempting to open file" << endl;
- if (!x.is_open()) {
- cout << "Bad input file name. Input was: " << fileName << endl;
- throw lab0badInput;
- }
- else {
- string temp;
- while (x >> temp) {
- inputStrings.push_back(temp);
- }
- x.close();
- }
- return inputStrings;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement