C
crichmon
Hi,
In a program I am working on I have messages sent to the screen for various
reasons. Rather then using cout directly, I'd like to send an ostream as a
parameter to a method of an object created to centralize messages. For
instance (I'm not saying this code works):
instead of
cout << "some helpful text " << x << " " << y << endl;
I write something to the effect of
MessageCenter.message( "some helpful text " << x << " " << y << endl );
Any insight on how to implement this properly?
thanks,
crichmon
In a program I am working on I have messages sent to the screen for various
reasons. Rather then using cout directly, I'd like to send an ostream as a
parameter to a method of an object created to centralize messages. For
instance (I'm not saying this code works):
instead of
cout << "some helpful text " << x << " " << y << endl;
I write something to the effect of
MessageCenter.message( "some helpful text " << x << " " << y << endl );
Any insight on how to implement this properly?
thanks,
crichmon