Re: iostreams equivalent to C's fopen "r+"
From: Mike Wahler (mkwahler_at_mkwahler.net)
Date: 11/18/03
- Next message: Fred Ma: "Manic C++ programming"
- Previous message: lilburne: "Re: private destructor"
- In reply to: Dave O'Hearn: "Re: iostreams equivalent to C's fopen "r+""
- Next in thread: Dave O'Hearn: "Re: iostreams equivalent to C's fopen "r+""
- Reply: Dave O'Hearn: "Re: iostreams equivalent to C's fopen "r+""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 18 Nov 2003 22:44:48 GMT
"Dave O'Hearn" <daveoh77@pobox.com> wrote in message
news:3e05f9e4.0311181325.39b16d9b@posting.google.com...
> I think I have to use the hack I found online, where you open for 'in'
> mode first, then if it succeeds, reopen for in|out mode. It's odd that
> 'nocreate' isn't standard, since it's easy enough for a library to
> fake even if the OS doesn't support it... and if the library doesn't
> fake it, all the user code has to fake it instead. But that didn't
> happen, so I will just have to fake it myself, oh well. Thanks.
It appears to me that you're suffering from a broken implementation.
std::ios::in | std::ios::out should not create the file if it does
not exist. Perhaps consider an upgrade, to a newer version or a
different vendor.
-Mike
- Next message: Fred Ma: "Manic C++ programming"
- Previous message: lilburne: "Re: private destructor"
- In reply to: Dave O'Hearn: "Re: iostreams equivalent to C's fopen "r+""
- Next in thread: Dave O'Hearn: "Re: iostreams equivalent to C's fopen "r+""
- Reply: Dave O'Hearn: "Re: iostreams equivalent to C's fopen "r+""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|