Also keep that shoe away ;-)
--
Regards,
Nish [VC++ MVP]
http://www.voidnish.com /* MVP tips tricks and essays web site */
http://blog.voidnish.com /* My blog on C++/CLI, MFC, Whidbey, CLR... */
"Doug Harrison [MVP]" <ds*@mvps.org> wrote in message
news:4t********************************@4ax.com...
Vinayak Raghuvamshi wrote:
"Doug Harrison [MVP]" <ds*@mvps.org> wrote in message
news:<an********************************@4ax.com>. .. Vinayak Raghuvamshi wrote:
>Visual Studio .Net 2003 Enterprise Architect. (VC++ code)
>
>a developer in our team made a typo and his code looks like this
>
>if (sendMessage == NULL)
> m_ErrorCode = 0 ERR_MESSAGE_EMPTY;
>
>But the compiler did not crib at all ! everything built fine....
> .....
>-Vinayak
What's the definition of ERR_MESSAGE_EMPTY? If it's a macro, you can
compile with /P and view the .i file that is produced to see the result of
preprocessing.
Sorry, My Bad. ERR_MESSAGE_EMPTY was defined as -17 :-(
To fix the problem and avoid it in the future, you can enclose it in
parentheses or change it from a macro to a const int.
--
Doug Harrison
Microsoft MVP - Visual C++