Say I have a function like
void printToSomewhere(FILE* stream, char* msg){
fprintf(stream, "%s", msg);
}
If I want the stream to be stdout
, do I have to declare that before in the calling function:
...
FILE* stdout;
printToSomewhere(stdout, "printing to stdout");
...
or can I call the function without having to define/include/etc stdout explicitly?
...
printToSomewhere(stdout, "printing to stdout");
...