in the main-function. Then I call a function, where I close the file f and open it again. I thought, the function prototype can look like this:Code:FILE *f = NULL;
and I call it in the main-function this way:Code:void my_function(FILE *f);
But now, in my_function, when I close the file and open it again, the pointer is messed up in the main-function.Code:my_function(f);
When I have the prototype this way:
and call the function this way:Code:void my_function(FILE **f);
then it works, but it doesn't looks that good with the pointer to the pointer...Code:my_function(&f);
Any suggestions how to remove the double-pointer?