Hi,
When I write the Ctor as follows, I get an Error:
Invalid Sharing Flag 0
(That happens when file exists or does not exist)
1 2 3 4
|
File::File(const string& file)
{
m_file.open(file, std::ios::out, std::ios::app);
}
|
When I write the Ctor as foolows, I manage to open / create a file.
1 2 3 4
|
File::File(const string& file)
{
m_file.open(file);
}
|
What is wrong with option #1?
Please note that
m_file is a data member of type
ofstream
Thank you.
Last edited on