Path: utzoo!attcan!utgpu!watmath!att!dptg!rutgers!apple!dlyons From: dlyons@Apple.COM (David Lyons) Newsgroups: comp.sys.apple Subject: using fscanf() in C (was Re: How do you get shr graphics?) Message-ID: <34460@apple.Apple.COM> Date: 31 Aug 89 00:20:29 GMT References: <8908301808.aa09901@SMOKE.BRL.MIL> Organization: Apple Computer Inc, Cupertino, CA Lines: 17 In article <8908301808.aa09901@SMOKE.BRL.MIL> KMILES@CC.USU.EDU ("Kurt Miles, VAX Consultant") writes: >[...] >fscanf(fp,"%d %d %d",m,n,color); That looks like the problem: fscanf needs *pointers* to the variables where it should place the results. Try: fscanf(fp,"%d %d %d", &m, &n, &color); --Dave Lyons, Apple Computer, Inc. | DAL Systems AppleLink--Apple Edition: DAVE.LYONS | P.O. Box 875 AppleLink--Personal Edition: Dave Lyons | Cupertino, CA 95015-0875 GEnie: D.LYONS2 or DAVE.LYONS CompuServe: 72177,3233 Internet/BITNET: dlyons@apple.com UUCP: ...!ames!apple!dlyons My opinions are my own, not Apple's.