Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!att!linac!uwm.edu!zaphod.mps.ohio-state.edu!rpi!uupsi!rodan.acs.syr.edu!goldberg From: goldberg@rodan.acs.syr.edu (Ross Goldberg) Newsgroups: comp.sys.amiga.programmer Subject: SAS C Bug?? Standard FILE command does not work!! Message-ID: <1991Jan27.221835.1230@rodan.acs.syr.edu> Date: 27 Jan 91 22:18:35 GMT Sender: goldberg@rodan.acs.syr.edu (Ross Goldberg) Distribution: usa Organization: Syracuse University, Syracuse, NY Lines: 48 I am trying to get a procedure working to read and write records to the disk. This is accomplished in many books by using fwrite and fread. The sample below comes from one of the books...the problem is: On SAS C, the first argument in fwrite or fread which is &grades or something like that in this case gives a warning 88: argument type incorrect This is standard C code so I am confused as to why SAS doesn't like it. Any other ideas? I tried using fscanf, but the problem there is that a space ends reading in a string, and my strings my have 0, 1, or more spaces in them. The material being written in my case consists of 5 integers and 2 strings (char arrays of [51] and [25] ) for however many entries there are. anyway, here is the other one below. (both mine and this give the same warning) #include main () { typedef struct { char name[15]; int midterm; } grades; int i,number; char name[50]; grades student; FILE *fp; printf("class file "); scanf("%s",name); if (NULL!=(fp=fopen(name,"w"))) { printf("number of students"); scanf("%d",&number); for (i=0;i