Article View: comp.os.msdos.programmer
Article #1283Read a structure from disk?
From: Mark Maslar x3095
Date: Fri, 04 Sep 1992 18:50
Date: Fri, 04 Sep 1992 18:50
26 lines
1091 bytes
1091 bytes
Does anyone know of a simple way of reading an entire structure
from a disk? I'd like to avoid having to read each element of the
structure. Here's what I tried:
/* ************************************************************ */
typedef struct
{
char name[33]; /* Company name */
char addr1[33]; /* Company address 1 */
char addr2[33]; /* Company address 2 */
} address;
address data;
fscanf(fp, "%address", &data); /* This DOESN'T work. */
/* ************************************************************ */
Please e-mail any ideas to Mark Maslar at:
maslar@icd.ab.com (Internet)
Thanks in advance,
Mark Maslar
Technical Details
Message-ID:
<1992Sep4.135012.8811@iccgcc.decnet.ab.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!kithrup!hoptoad!decwrl!sdd.hp.com!caen!destroyer!gatech!usenet.ins.cwru.edu!icd.ab.com!iccgcc.decnet.ab.com!maslarShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!kithrup!hoptoad!decwrl!sdd.hp.com!caen!destroyer!gatech!usenet.ins.cwru.edu!icd.ab.com!iccgcc.decnet.ab.com!maslar From: maslar@iccgcc.decnet.ab.com (Mark Maslar x3095) Newsgroups: comp.os.msdos.programmer Subject: Read a structure from disk? Message-ID: <1992Sep4.135012.8811@iccgcc.decnet.ab.com> Date: 4 Sep 92 13:50:12 EST Lines: 27