#include FILE *getfp(fptype) char *fptype; { char string[60]; FILE *fp; do { printf("\nFile name: "); scanf("%s%*c",string); fp=fopen(string,fptype); if(fp==NULL) printf("I cannot open this file, please try again."); } while(fp==NULL); return(fp); }