Originally posted by [EMOBA]
You don't have to pass the pointer in by address, but you will have to return a copy of the FILE* from the function.
It all depends on how the function is coded :
Code:
void OpenStream( FILE** fp, char* mode, char* fileName )
{
..
..
}

//Or the second way

FILE* OpenStream( char* mode, char* fileName )
{
..
..
}
Here's how both would be used :
Code:
//For the first method
FILE *fp1;
OpenStream(&fp1,"r","blah");

//For the second method
FILE *fp1;
fp1 = OpenStream("r","blah");