I defined a multi-line macro function using line continuation character "" like the following:
#define SHOWMSG( msg )
{
std::ostringstream os;
os << msg;
throw CMyException( os.str(), __LINE__, __FILE__ );
}
But it could not pass compilation. BTW, I'm using VS2008 compiler. Would you please tell what's wrong with my aforesaid macro function?
Aucun commentaire:
Enregistrer un commentaire