Victor Bazarov wrote:
>
AFAICT, your problem falls under what's answered in FAQ 5.8.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Not sure what AFAICT means... but I did manage to find FAQ 5.8 :)
Here is the fstream object.
http://www.dreamscripts.net/BasicFile.h http://www.dreamscripts.net/BasicFile.cpp
Here is a fragment of code that Im using...
// ... snipped ... //
CBasicFile* infile = new CBasicFile();
char* temp = new char[128];
temp = (char*) memset( temp, '\0', 128 );
CBasicFileReturnCodes retValue =
infile->OpenFile(configFilename.c_str(), MODE_READ | TYPE_TXT);
string _modes = infile->GetModesString();
if ( retValue == SUCCESS )
{
while ( infile->ReadLine(temp, 128) == SUCCESS )
{
config.push_back(wxString(temp));
temp = (char*)memset(temp, '\0', 128);
}
}
delete [] temp;
// infile->Close(); // <-- not needed.. done in deconstructor
delete infile;
// ... snipped ... //
Basically, retValue is returning ERROR_FILE_NOT_GOOD. The _modes
variable is "Read Text". So Im passing fstream::in. Is there any way
to get more detailed information why good() is returning false?