I'm handling a file using fstream, and I need to read and write to it. However, even using std::ios:in, the file continues to be created if it does not exist:
std::fstream file("myfile.txt", std::ios::in | std::ios::out | std::ios::app);
Any thoughts?
Thanks in advance!
if (std::filesystem::exists("myfile.txt")) ...appfixes issue vote to close as typo.