Hey guys a little rusty with c++ because i haven't done much of it in a while now. I have a question hopefully someone can help me out with. My professor wants me to have a class where i can pass &cout to it. ie: SpyOutput (&cout);
Just wondering what the constructor look like for this??
That's the "address of" operator. You use it to assign pointers values. So your parameter must be a pointer to std::cout's type (a pointer to std::ostream).
I completely forgot about that. I did some googling without much luck though. This is what i did but it didn't compile so its obviously wrong SpyOutput (*std::ostream);. Any suggestions??