int i = 0;
int j = s.find(c);
while (j >= 0) {
v.push_back(s.substr(i, j-i));
i = ++j;
j = s.find(c, j);
if (j < 0) {
v.push_back(s.substr(i, s.length()));
}
}
}
void loadCSV(istream& in, vector<vector<string>*>& data) {
vector<string>* p = NULL;
string tmp;
while (!in.eof()) {
getline(in, tmp, '\n'); // Получить следующую строку
p = new vector<string>();
split(tmp, '.', *p); // Использовать split из
// Рецепта 4.7
data.push_back(p);
cout << tmp << '\n';
tmp.clear();
}
}
int main(int argc, char** argv) {
if (argc < 2)
return(EXIT_FAILURE);
ifstream in(argv[1]);
if (!in)
return(EXIT_FAILURE);