RhinomanUK
Technical User
Hi
I'm not entirely sure where my problem lies. I am using BCB6 Personal v6. I am reading a csv file using fstream. It is code that I have used before but this time I don't get the commas in the data read in. Another programme using the same code compiles and runs correctly. The only difference seems to be that the code that doesn't work corrrectly won't compile without Classes.hpp included.
I have tried opening the file in both binary and text modes, this makes no difference (in either case). The code that reads in the data is:
TIA
James
I'm not entirely sure where my problem lies. I am using BCB6 Personal v6. I am reading a csv file using fstream. It is code that I have used before but this time I don't get the commas in the data read in. Another programme using the same code compiles and runs correctly. The only difference seems to be that the code that doesn't work corrrectly won't compile without Classes.hpp included.
I have tried opening the file in both binary and text modes, this makes no difference (in either case). The code that reads in the data is:
Code:
unsigned char FileHandler::getChar(int position)
{
FileHandlerFile.seekg(position,ios::beg);
FileHandlerFile.read(reinterpret_cast<char*>( &inData ),1); //retrieve one character at a time
return inData;
}
TIA
James