www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/03/01/17:04:27

Disclose-Recipients: prohibited
Date: Wed, 1 Mar 1995 16:32:02 EST
From: "Steve Salter (519) 452-4447" <SALTERS AT AM DOT FANSHAWEC DOT ON DOT CA>
Subject: Re: Problems with simple fstream program
To: DJGPP Mailing List <djgpp AT sun DOT soe DOT clarkson DOT edu>
Cc: 50santorg%qstar DOT fanshawec DOT on DOT ca AT MR DOT FANSHAWEC DOT ON DOT CA
Autoforwarded: false
Importance: normal
Ua-Content-Id: 11930C200000
Hop-Count: 0

Bill, etc.

A simple change to the test program will make it work.  Change

        infile.open (filename, ios::nocreate);

to

        infile.open (filename, ios::nocreate | ios::in);

As to whether or not ios::in should be assumed by ios::nocreate -- I don't
know.  Can someone quote the appropriate C++ "standard" :-).

Steve Salter


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019