c++ reading csv file

Read the file line by line:

std::string line;
while(std::getline(stream, line)) ...

Pass each line to a istingstream and read the fields:

std::istringstream s(line);
std::string field;
while (getline(s, field,',')) ...

Disclaimer: This is a simplified parsing of a csv-file.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)