I have a .csv file with the following:
leería toda la linea,
si pudiera,
I've tried to read it with the following code:
#include <iostream>
#include <fstream>
#include <string>
int main(){
std::wstring wstr;
std::wifstream FILE("data.csv");
if(FILE){
getline(FILE, wstr, L',');
std::wcout << wstr << std::endl;
FILE.close();
} else {
std::cout << "The file failed to open";
}
FILE.close();
return 0;
}
And the Output is:
leer
It seems to stop reading after reaching the 'í'. Why is my code not working ?