I changed my code here as DrEvil said:
Code:
DatabaseHelper::write.open(destination.c_str(), std::fstream::app | std::fstream::out);
and here to try to find out why it's not working:
Code:
if (!DatabaseHelper::write)
std::cout << "Stream Error: " << (int)DatabaseHelper::write.rdstate() << std::endl;
using
out flag did not help, and the return from
rdstate() is always 4, that means failbit.
closing the stream after writing as Cheseeh said did not help too.
From ios_base.h
Quote:
Failbit: Indicates that an input operation failed to read the expected
characters, or that an output operation failed to generate the
desired characters.
|
No success yet. I'll keep trying.
Thank you very much guys... Any help will be very apreciated!