What is the difference between DEBUG and _DEBUG in vc++ in visual studio 2008.Is there any difference because in In my project,in some module preprocessor is DEBUG and in some module it is _DEBUG.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In your own code you can check for any macro you want, so it doesn’t matter which one to use.
But the libraries you use may behave different. E.g. the MSDN documentation about
assertstates:So I would suggest to always use
_DEBUG.Edit: According to MSDN you do not even have to define any special debug macro because the compiler will do it for you as soon as you specify a debug runtime library.