Hey there. I have a file function that is not working correctly and am a bit stumped by it. I'd appreciate any help.
void SaveFile(student list, FILE *database);
void SaveFile(student list, FILE *database)
database = fopen("database.txt","w"); //Here I am trying to connect to the file and have it create a file
SaveFile(list, database); //then the program prints the list to the file
fclose(database);//and then closes the file
Every time I set up the function call the program will not execute properly. It terminates and errors half way through the execution. Help? Thank you.
And I do have the File defined.