home *** CD-ROM | disk | FTP | other *** search
- Path: 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
-
-
- 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
-
-