how do I set a debug mode in c++
<p>I would like to set a debug mode so that it prints the log statements only if the debug mode is on. For example if I have code like this</p>

<pre><code>printf("something \n");
.
.
.
perror("something \n");
</code></pre>

<p>It only works if the debug flag is on.. I don't want to use "if" statements.
I think there is a clever way to do this using #define or something..</p>

<p>Thank is advance..</p>
