0 LIKES LikeUnLike
vector<string> read_all_files( vector<string> filenames ) { vector<string> result; string line; for (vector<string>::iterator filename = filenames.begin(); filename != filenames.end(); filename++ ) { ifstream file( *filename ); ////////////////////////// THIS LINE IS PROBLEMATIC if (!file) continue; while (getline( file, line )) result.push_back( line ); file.close(); } return result; }
Tags:
Report (0) (0) | earlier
Latest activity: earlier. This question has 2 answers.