I want to write a function that accepts a stream argument. Ideally I would like that argument to be the console (if I want the output to go to the screen), or a file (if I want to save the output).
Something like this:
void myFunc(<some stream object> strm)
{
strm.Write("something");
}
How do I declare and call the function to get the behavior I am looking for?