assume that the parameters have data of strings and integers that are in a structure with typedef
my function crashes when I added the fread function.
void save_question(type_tag *easy,type_tag *med,type_tag *diff,type_tag *bonus,int ind){ FILE *fl; type_tag *test; if(ind==0){ fl=fopen("SAVED EASY QUESTIONS.dat","wb"); fwrite(&easy,sizeof(type_tag),1,fl); fclose(fl); fl=fopen("SAVED MEDIUM QUESTIONS.dat","wb"); fwrite(&med,sizeof(type_tag),1,fl); fclose(fl); fl=fopen("SAVED DIFFICULT QUESTIONS.dat","wb"); fwrite(&diff,sizeof(type_tag),1,fl); fclose(fl); fl=fopen("SAVED EASY QUESTIONS.dat","rb"); fread(&test,sizeof(type_tag),1,fl); fclose(fl); getch(); } }