Re: iostreams equivalent to C's fopen "r+"

From: Mike Wahler (mkwahler_at_mkwahler.net)
Date: 11/18/03


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



Relevant Pages

  • Re: iostreams equivalent to Cs fopen "r+"
    ... >> mode first, then if it succeeds, reopen for in|out mode. ... >> fake it, all the user code has to fake it instead. ... finds nothing but default parameters in declarations, ... terse table describing the 6 openmode flags, ...
    (comp.lang.cpp)
  • Re: iostreams equivalent to Cs fopen "r+"
    ... > In the Windows implementation it does, on most Unix systems it does not. ... compilation, or it won't compile on Red Hat 9 at all. ... mode first, then if it succeeds, reopen for in|out mode. ... fake it, all the user code has to fake it instead. ...
    (comp.lang.cpp)
  • Re: are you really safer now
    ... The person simply compares your BP with your photo ID and ... convince the airline couner agent with your fake ID to get your BP. ... The point is that when you check in online, you are NOT checking in as the person known as a terrorist. ... use BP with correct name to board aircraft as some machines will display the pax name when boarding and the name on the BP should match the reservation name. ...
    (rec.travel.air)
  • Re: Will never deal with Wolf Camera again
    ... Online, protect the purchase ... Camera gear is either fake or expensive because... ... I was informed by my Canon rep the other day that they have seen fake L lenses turn up at their service department. ... Basically, because camera gear is expensive, there is no shortage of shysters around who are prepared to take advantage of the fact that so many people try to get stuff cheap. ...
    (rec.photo.digital.slr-systems)
  • Re: 9/11 Family Member Patty Casazza: Government Knew Exact Date and Exact Targets
    ... I see you like to smear people online that you don't agree with. ... Mr. Orwell just committed the most foul acts I have seen in this ...
    (alt.sports.baseball.bos-redsox)