I’m using lazycsv for parsing a csv file that contains the paths of several images, but my program isn’t able to find them. However, if I print those paths, they work fine in other programs.
After some testing I’ve realized that if I try to encapsulate those paths between “()” characters, the last one gets printed inside the path. For example, if the image that I’m trying to read is located in ./tmp/image1.bmp and that path is stored in a variable defined as std::string symbol_path
, using cout << "(" << symbol_path << ")" << endl;
prints (./tmp/i)age1.bmp.
Additionally, converting those strings to std::filesystem::path results in the same behaviour.
Do you have any idea of what could be causing this issue?
I’ve also tried concatenating that line using + operators and saving it to an auxiliar string prior to printing it out, but the same result is obtained. It seems that the string has some kind of problem that causes the program to think that its last character is not at the end of it