I opened a file in my main() function like this
FILE *myfile = fopen("myfile.txt","r");
I want to use the file for input in another function called writeData.
How do I pass the file pointer *myfile to writeData?
Im using GCC and get a Segmentation Fault if I pass 'myfile'.
What parameters should the writeData function contain? (I used 'const char *file')