Path: utzoo!attcan!uunet!wash08!rae98 From: rae98@wash08.UUCP (rae98) Newsgroups: comp.lang.c Subject: Re: C Programming Problem Message-ID: <210@wash08.UUCP> Date: 4 Jan 89 20:10:04 GMT References: <32229@auc.UUCP> Reply-To: rae98@wash08.UUCP (Bob Earl) Distribution: na Organization: American Chemical Society, Washington, DC Lines: 20 In article <32229@auc.UUCP> tab@auc.UUCP (0-Terrence Brannon ) writes: > int i, q, r, s, t, u, v; > fscanf(fp, "%s %d %d %d %d %d %d", a, q, r, s, t, u, v); > >Any ideas why valid integers from a file can't be read in as integers but >only can be read in a char strings? > >...!gatech!auc!tab Yes. You'll probably get a hundred responses, but scanf requires pointers for values, so the line should read: fscanf(fp, "%s %d %d %d %d %d %d", a, &q, &r, &s, &t, &u, &v); This should take care of your problem. -- ------------------------------------------------------- UUNET: uunet!wash08!rae98 should work. BITNET: I don't know...can you tell me? UUCP: rae98@wash08.UUCP does this work?