Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!mailrus!uflorida!gatech!gt-cmmsr!auc!tab From: tab@auc.UUCP (Terrence Brannon ) Newsgroups: comp.lang.c Subject: C Programming Problem Message-ID: <32229@auc.UUCP> Date: 3 Jan 89 15:32:03 GMT Reply-To: tab@auc.UUCP (0-Terrence Brannon ) Distribution: na Organization: Atlanta University Center Lines: 47 Ok, this is my source: --------------------- #include main() { FILE *fp; char *a; int i, q, r, s, t, u, v; fp = fopen("tab.dat", "r"); a = (char *) calloc (80, sizeof(char)); for (i=0, i < 3; ++i); { fscanf(fp, "%s %d %d %d %d %d %d", a, q, r, s, t, u, v); printf("%s %d %d %d %d %d %d", a, q, r, s, t, u, v); } } And this is tab.dat: ------------------- I 11 16 88 22 20 10 O 11 16 88 22 23 21 I 11 16 88 22 23 30 O 11 16 88 22 23 39 When I do the following: ----------------------- cc -g filename.c sdb r I get a "doscan.c no such file or directory" error from sdb This snippet of code works when i read character values from the file (ie: fscanf(fp, "%s %s %s %s %s %s %s", c1, c2, c3, c4, c5 ,c6, c7) but if doesnt work when trying to read integer values from the file as with the above fscanf in the source code. 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