title: C Macros to create strings
body: <blockquote>
  <p><strong>Alternative Titles (to aid search)</strong></p>
  <ul>
  <li>Convert a preprocessor token to a string</li>
  <li>How to make a char string from a <strong>C</strong> macro's value?</li>
  </ul>
  </blockquote>
  <h1>Original Question</h1>
  <p>I would like to use <strong>C</strong> <code>#define</code> to build literal strings at compile time.</p>
  <p>The string are domains that change for debug, release etc.</p>
  <p>I would like to some some thing like this:</p>
  <pre><code>#ifdef __TESTING
      #define IV_DOMAIN example.org            //in house testing
  #elif __LIVE_TESTING
      #define IV_DOMAIN test.example.com       //live testing servers
  #else
      #define IV_DOMAIN example.com            //production
  #endif
  
  // Sub-Domain
  #define IV_SECURE &quot;secure.IV_DOMAIN&quot;             //secure.example.org etc
  #define IV_MOBILE &quot;m.IV_DOMAIN&quot;
  </code></pre>
  <p>But the preprocessor doesn't evaluate anything within &quot;&quot;</p>
  <ol>
  <li>Is there a way around this?</li>
  <li>Is this even a good idea?</li>
  </ol>