Hi, I'm actually creating a project and so for that I decided to create my version of file management with a class but my problem is that I added a function called "changeMode" and that's to change the open mode of the file, here the code
void personal::File::changeMode(std::ios_base::_Openmode mode)
{
m_out->close();
delete(m_out);
m_out = new std::ofstream(m_outPath, mode);
}
and I get an error when I want to use the function with the parameter, I'll write down the error just bellow but the code where the error is, is here
if (m_mode == std::ios_base::app)
{
changeMode(std::ios_base::out);
}
*m_out << finalText;