void ReadDataFromCsv(std::string &filename, std::vector<std::vector<std::string> > &lines_feat) { std::ifstream vm_info(filename.c_str()); std::string lines, var; std::vector<std::string> row; lines_feat.clear(); while(!vm_info.eof()) { getline(vm_info, lines); if(lines.empty()) break; std::istringstream stringin(lines); row.clear(); while(std::getline(stringin, var, ',')) { row.push_back(var); } lines_feat.push_back(row); } }