Compiler saying ios::noreplace not a member of std::ios.

Sep 14, 2013 at 12:44am
This is my line of code I get an error saying noreplace is not a member of std::ios. I'm using DEV C++. Is this a case where some compilers don't offer it.

ofstream outputfile(fname, std::ios::noreplace);
Sep 14, 2013 at 12:48am
I looked in one C++ book, and it's in there, but not in the C++ primer book.
Sep 14, 2013 at 1:54am
AFAIK that flag was only considered, but never actually made it into the library, so you shouldn't use it. You can emulate the functionality yourself relatively easily if you need to anyway.
Topic archived. No new replies allowed.