M
Mike Austin
It's the most annoying thing, and causes hours of frustration. Why can't it
be resolved?
Regards,
Mike Austin
Example:
#include <iostream>
#include <string>
using namespace std;
class DataStore {
public:
Store( string filename ) {
datafile.open( filename.c_str(), ios::in | ios::binary );
if( !_datafile ) {
datafile.clear(); // Will not work correctly without clearing
datafile.open( filename.c_str(), ios:ut | ios::binary );
datafile.write( "what the?", 9 );
}
datafile.close();
datafile.open( filename.c_str(), ios::in | ios:ut | ios::binary );
private:
fstream datafile;
};
be resolved?
Regards,
Mike Austin
Example:
#include <iostream>
#include <string>
using namespace std;
class DataStore {
public:
Store( string filename ) {
datafile.open( filename.c_str(), ios::in | ios::binary );
if( !_datafile ) {
datafile.clear(); // Will not work correctly without clearing
datafile.open( filename.c_str(), ios:ut | ios::binary );
datafile.write( "what the?", 9 );
}
datafile.close();
datafile.open( filename.c_str(), ios::in | ios:ut | ios::binary );
private:
fstream datafile;
};