I am using std::getline in a while loop and printing the output with cout, I find that the beginnings of my line are being cut off when I am printing:
works as expected:
std::string line; while(std::getline(csv, line)) { std::cout << line << std::endl } doesn't work as expected, cuts the first two characters out of my line
std::string line; while(std::getline(csv, line)) { std::cout << line << " " << std::endl } I've never noticed this behaviour before, why is it happening now?
coutto blame and not that thelineis actually missing the expected characters?" "to replace beginning of your string.