🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.programmer
Article #1105

fopen in Turbo-c

#1105
From: marc.d.sayre
Date: Mon, 21 Jan 1991 15:44
32 lines
1264 bytes
Hi there people,

	A quick question, I am used to using c programming on a amdahl, but
	also started working on msdos Turbo-c 1.5. I am having
problems with reading and writing to a file. I am using a structure of about
8 to 10 doubles in it.


struct empdata {
	double wages;
	double	tariff;
	..
	..

	double netwages;
} EmpData;

When I am  writing and reading to a file, a lot of the time I get an fread error
19 invalid argument. I can figure it out. Does this have something to do
with using ptr=fopen("DATA","r+b"); . I have never seen  "r+b" before, but maybe
that is the problem. could somebody explain this r+b and tell me if this is
my problem.

Please respond to the above newsgroups or ihlpb!eotto, don't respond to the 
default address PLEASE.


Thanks guys .

Erick Otto
AT&T Network Systems UK
Technical Details
Message-ID: <1991Jan21.154432.11941@cbnewsm.att.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!att!cbnews!cbnewsm!mds1

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!att!cbnews!cbnewsm!mds1
From: mds1@cbnewsm.att.com (marc.d.sayre)
Newsgroups: comp.sys.ibm.pc.programmer,alt.msdos.programmer
Subject: fopen in Turbo-c
Keywords: fopen Turbo-c fread fwrite of doubles floats.
Message-ID: <1991Jan21.154432.11941@cbnewsm.att.com>
Date: 21 Jan 91 15:44:32 GMT
Distribution: usa
Organization: AT&T Bell Laboratories
Lines: 32