Регистрация | Вход
vector<vector<double>> csvread(string path, char token){ ifstream fs(path); vector<string> lines; string line; while (getline(fs, line)) lines.push_back(line); vector<vector<double>> result; for (int i = 1; i < lines.size(); ++i) { stringstream ss(lines[i]); vector<double> seglist; string segment; while (getline(ss, segment, token)) { double val = 0; val = stod(segment); seglist.push_back(val); } result.push_back(seglist); } return result;}