Hi.
I have a function that looks exactly like this:
void Tga_string::write_to_file(ofstream& file)
{
if(file.is_open()){
for(u_int indx(0);indx<Fcommands.size();indx++)
file<<Fcommands[indx]->command_string().c_str()<<endl;
file<<"//END\n\n";
}
else
throw Efile_nopen("ga string file"
}
The trouble is, whenever I call it, I get a wierd message saying:
Assertion failed: !"bogus context in _ExceptionHandler()", file xx.cpp, line 3071
Then I get an abnormal program termination to OK, & then I am bounced to the CPU box, which is WAY out of my league.
I can create the file & write to it in the main body of my code, so why won't it work here?
The line it falls over on is:
file<<Fcommands[indx]->command_string().c_str()<<endl;
All other functions checked out here are fine - the command_string() function simply returns an STL string & checks out OK.
Can anybody offer any help?
I'm deeply baffled!
Cheers,
DJL
Common sense is what tells you the world is flat.
I have a function that looks exactly like this:
void Tga_string::write_to_file(ofstream& file)
{
if(file.is_open()){
for(u_int indx(0);indx<Fcommands.size();indx++)
file<<Fcommands[indx]->command_string().c_str()<<endl;
file<<"//END\n\n";
}
else
throw Efile_nopen("ga string file"
}
The trouble is, whenever I call it, I get a wierd message saying:
Assertion failed: !"bogus context in _ExceptionHandler()", file xx.cpp, line 3071
Then I get an abnormal program termination to OK, & then I am bounced to the CPU box, which is WAY out of my league.
I can create the file & write to it in the main body of my code, so why won't it work here?
The line it falls over on is:
file<<Fcommands[indx]->command_string().c_str()<<endl;
All other functions checked out here are fine - the command_string() function simply returns an STL string & checks out OK.
Can anybody offer any help?
I'm deeply baffled!
Cheers,
DJL
Common sense is what tells you the world is flat.