From: kagel AT quasar DOT bloomberg DOT com Date: Thu, 30 May 1996 13:24:21 -0400 Message-Id: <9605301724.AA03701@quasar.bloomberg.com > To: rkwcvdz AT rivier1 DOT puk DOT ac DOT za Cc: djgpp AT delorie DOT com In-Reply-To: <46251.rkwcvdz@rivier1.puk.ac.za> Subject: Re: Moving from Pascal to Djgpp Reply-To: kagel AT dg1 DOT bloomberg DOT com From: Date: Wed, 29 May 96 09:01:36 #include int main(void); void exit(int); int main(void) { int c; File *fin, *fout; ^^^^ Here is your problem. The typedef is FILE not File. This should be: FILE *fin, *fout; fin = fopen("in.dat", "r"); if (fin == NULL) { printf("Unable to open file in.dat\n"); exit(1); } fout = fopen("out.dat", "w"); if (fout == NULL) { printf("unable to open file out.dat\n"); exit(2); } while ((c=fgetc(fin)) != EOF) { if (fputc(c, fout) != c) { printf("Error writing out.dat\n"); exit(3); } } fclose(fin); fclose(fout); return 0; } -- Art S. Kagel, kagel AT quasar DOT bloomberg DOT com A proverb is no proverb to you 'till life has illustrated it. -- John Keats