At the top and bottom of main() i have (respectivly)

openFiles('r');
readDataFromFile();
closeFiles('r');

and

openFiles('w');
writeDataToFile();
closeFiles('w');

and then in files.c i have my code that will take thr user input and write it to the three external files. But as soon as i run the program, it crashes before anything is printed onto the screen, so there must be a problem with the reading of the files, or the code that is accessing them. This is what i have that opens the files

void openFiles(char option)
{
if(option =='r')
{
memberRead = fopen("MemberFile.txt","r");
videoRead = fopen("RentalFile.txt" ,"r");
rentalRead = fopen("VideoFile.txt","r");
}
}

Is this correct?

Any help is weell appreciated.

BlueBob