title: How to pass string argument to macro
body: <p>I am trying to print <code>IT SUCCESS\nET SUCCESS\n</code> using following code but it's failing in compilation with error <code>error: ‘printds’ was not declared in this scope</code> which I know is because it's taking macro input as <code>ds</code> literal. Does anyone know how to do this? The use case is that there are several printXX() functions which should be called based on value passed in macro.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #define FOO(val) { \
      print ## val();    \
  }
  void printIT() { printf("IT SUCCESS\n"); }
  void printET() { printf("ET SUCCESS\n"); }
  
  int main() {
      const char* ds = "IT", es = "ET";
      FOO(ds); FOO(es);
      return 0;
  }
  </code></pre>