P
probstm
I am using a message handler class that implements amongst others:
static void message ( std::string aHeader,
std::string aMessage,
int aTimeout = 0,
MessageType aFlag =
MSG_Information );
I then use a set of defines, e.g.:
#define USR_MSG( msg ) MSG::message( "", msg, 0, MSG_User )
The problem is now that I get a compiler error when I write
USR_MSG("The value of x is " << x);
Does anybody have a smart solution for that? I thought about rerouting
std::cout but it doesn't seem to be the best way to me.
Thanks a lot for your help,
Martin.
static void message ( std::string aHeader,
std::string aMessage,
int aTimeout = 0,
MessageType aFlag =
MSG_Information );
I then use a set of defines, e.g.:
#define USR_MSG( msg ) MSG::message( "", msg, 0, MSG_User )
The problem is now that I get a compiler error when I write
USR_MSG("The value of x is " << x);
Does anybody have a smart solution for that? I thought about rerouting
std::cout but it doesn't seem to be the best way to me.
Thanks a lot for your help,
Martin.