I'm trying to read a file that uses 0xd7 and 0x0d as delimiters and the following code keeps failing:
Code:
bool readFile(string FileName, vector<string>* FileOutput) {
string currLine;
ifstream theFile(FileName.c_str());
if(theFile.is_open()) {
while(theFile.good()) {
getline(theFile,currLine);
FileOutput->push_back(currLine);
}
theFile.close();
return true;
}
return false;
}
Can anyone suggest a way around this? I'm really stuck.
I tried fixing the text file with a python script, but there to got an error: "UnicodeDecodeError: 'ascii' codec can't decode byte 0xd7 in position 9: ordinal not in range(128)"
Thanks.