title: Concatenating strings in macros - C++
body: <p>What's the easiest way to concatenate strings defined in macros.
  i.e. The pseudo code I'm looking for would be like:</p>
  
  <pre><code>#define ROOT_PATH "/home/david/"
  #define INPUT_FILE_A ROOT_PATH+"data/inputA.bin"
  #define INPUT_FILE_B ROOT_PATH+"data/inputB.bin"
  ...
  #define INPUT_FILE_Z ROOT_PATH+"data/inputZ.bin"
  </code></pre>
  
  <p>The only way I know of is to use strcat in the code, or using the string class and then the c_str method, but it can get messy when I have lots of input files. I'd like to just use INPUT_FILE_A, etc. directly and not have lots of local variables. Is there a good way to do this?</p>
  
  <p>Thanks.</p>