title: Is it okay to do "#ifdef DEBUG( ... ) __VA_ARGS__"?
body: <p>Global.h</p>
  
  <pre><code>#ifndef GLOBAL_H
  #   define GLOBAL_H
  
  #define DEBUG
  
  #ifdef DEBUG
  #   define IF_DEBUG( ... )   __VA_ARGS__
  #else
  #   define IF_DEBUG( ... )
  #endif /* DEBUG */
  
  #endif /* GLOBAL_H */
  </code></pre>
  
  <p>Main.cpp</p>
  
  <pre><code>#include &lt;string&gt;
  #include &lt;iostream&gt;
  #include "Global.h"
  
  int main() {
      int A = 1;
      int B = 2;
      int C = 0;
  
      IF_DEBUG(
          std::cout &lt;&lt; "\nStep 1&gt; Calculating...\n";
      )
  
      C = A + B;
  
      // DO WHATEVER
  
      IF_DEBUG(
          std::cout &lt;&lt; "\nStep n&gt; ...\n";
      )
  
      // ...
  
      std::cout &lt;&lt; C &lt;&lt; std::endl;
  
      // Note: I could also do some operations within the IF_DEBUG macro.
      IF_DEBUG(
          int X = 10;
          int Y = 5;
          int Z = X / Y;
          std::cout &lt;&lt; Z &lt;&lt; std::endl;
      )
  
      IF_DEBUG(
          std::cout &lt;&lt; "\nDebugged! This program has been paused. Enter any key to continue!\n";
          ::getchar();
      )
      return 0;
  }
  </code></pre>
  
  <p>Do you see how I defined <code>IF_DEBUG</code> in the Global header file (Global.h) and how I constantly used
  it in the Main source file (Main.cpp) for debugging purposes?
  Is it okay and safe to do that?</p>
  
  <p>I am asking this question because I am unsure if its okay to do that. When I show this to my friend and he said its "bad" to do that. Therefore, I am unsure.</p>