Author: Ulrich EckhardtUlrich Eckhardt Date: May 8, 2007 10:10
> 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);
You would always get a compile error when you write
"x is " << x
in a context where that is evaluated as is. FYI: in the context of
std::cout << "x is " << x << std::endl;
the expressions are evaluated as
(((std::cout << "x is ") << x) << std::endl);
|