Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!ncar!unmvax!tut.cis.ohio-state.edu!osu-cis!att!cbnews!rock From: rock@cbnews.ATT.COM (Y. Rock Lee) Newsgroups: comp.lang.c Subject: Re: C Programming Problem Message-ID: <2883@cbnews.ATT.COM> Date: 4 Jan 89 18:16:59 GMT References: <32229@auc.UUCP> Reply-To: rock@cbnews.ATT.COM (Y. Rock Lee) Distribution: na Organization: AT&T Bell Laboratories Lines: 20 In article <32229@auc.UUCP> tab@auc.UUCP (0-Terrence Brannon ) writes: > > char *a; > int i, q, r, s, t, u, v; > > a = (char *) calloc (80, sizeof(char)); > fscanf(fp, "%s %d %d %d %d %d %d", a, q, r, s, t, u, v); >I get a "doscan.c no such file or directory" error from sdb "doscan.c" is part of the standard C library and can be found in /usr/src/lib/libc/port/stdio.c. You can include it in the sdb's source list (see sdb(1)), but there's no reason to do this. Simply ignore the warning message. >This snippet of code works when i read character values from the file ... >but if doesnt work when trying to read integer values from the file ... "fscanf(fp, "%s %d %d %d %d %d %d", a, &q, &r, &s, &t, &u, &v);" will do it.