Here is my situation:
I have a text file with one line that contains:
1;2;3;4;5;6;7;8;9;10
Now I have a function that deals with each number separately. So I have myFunctionOne that deals with the number 1, I have myFunctionTwo that deals with the number 2, etc. I send in my text file to each function, and the function pulls out the specific number.
Am I allowed to call my functions as follows:
FILE *file
file = fopen("MyTextFile.txt","r");
myFunctionOne(file);
myFunctionTwo(file);
myFunctionThree(file);
fclose(file);
Can I just open the file, send it to all my functions, then close the file, or do I have to close the file and reopen it after every function call?