Group: comp.lang.c++
From: "Chris Thomasson"
Date: Sunday, April 13, 2008 10:20 PM
Subject: Re: Do you use a garbage collector?

"Chris Thomasson" wrote in message
news:dOSdndPYoLBiIJ_VnZ2dnUVZ_tOtnZ2d@comcast.com...
> "Razii" wrote in message
> news:see50458s99od8e59msmj6q8ho4di1g7av@4ax.com...
>> On Sun, 13 Apr 2008 19:51:10 -0700, "Chris Thomasson"
>> wrote:
>>
>>>
>>>"Razii" wrote in message
>>>news:anc5041s5nprp5am3t5idhl5j9tep7uadt@4ax.com...
>>>> On Sun, 13 Apr 2008 19:21:44 -0700, "Chris Thomasson"
>>>> wrote:
>>>>
>>>>>is fine. I wonder what happened. Anyway, I apologize.
>>>>
>>>> Ok, that's fine. I am now confused with all the versions posted.
>>>>
>>>> Can you post clean the working version on pastebin site
>>>>
>>>> http://pastebin.com/
>>>>
>>>> and post the link here.
>>>
>>>
>>>Here ya go:
>>>
>>>http://pastebin.com/m2493f289
>>
>> It's not working...When I run it, I get
>>
[...]
> What's not working? The DBG_PRINT macro only outputs anything when you
> compile in debug-mode. In order to get assert, or the DBG_PRINT macros to
> be nops you need to compile in non-debug mode. Then NDEBUG is defined.
>
>
> #if ! defined(NDEBUG)
> # include
> # define DBG_PRINTF(mp_exp) std::printf mp_exp
> #else
> # define DBG_PRINTF(mp_exp)
> #endif
>
>
> I treated DBG_PRINT like the assert macro. Read about the NDEBUG
> pre-processor definition and how it relates to assert here:
>
> http://en.wikipedia.org/wiki/Assert.h
>
>
> Are you sure that you have been compiling the C++ code in non-debug mode?

VC++ IDE should automatically define NDEBUG for release builds.

Safety Articles | Usenet Groups | Usenet News | Bluegrass