I am trying to create a logging function that accepts loggin info (strings, variables, etc) and an options label ('mask' in this case).
To do this I think I need to pass an IO buffer through to my function so I am trying to figure out how to do this. I can see why it doesn't work below, but I am trying to figure out how to make it work. I am trying keep the code in the following "main()" function to a minimum as it needs to be useful for others.
This is my first post and I am still fairly new at C++. Please be kind!
If you want to pass std::cout (or whatever) to a function, it's best to pass is by reference. std::cout is of type std::ostream. So, to pass std::cout, you would write something like this: