title: c/c++ (VS2008) enclose macro param in quotes
body: <p>For a lot of function calls in a C app that needs some degree of debugging I wanted to add a macro to ease the typing that I had to do.</p>
  
  <p>right now I am calling a function like this:</p>
  
  <pre><code>aDebugFunction(&amp;ptrToFunction, __LINE__, "ptrToFunction", param1, param2, etc)
  </code></pre>
  
  <p>So I thought lets write a macro that does the first 3 parameters for me, like this:</p>
  
  <pre><code>#define SOMEDEFINE(x) &amp;x, __LINE__,  "x"
  </code></pre>
  
  <p>However, as most of you will immediately know, this won't work it won't replace "x" with the name that x has been given but will just pass "x" as 3rd parameter.</p>
  
  <p>My knowledge of this preprocessor macro happening stuff is quite limited and thus my googling-ability is also quite useless due to not knowing where to search for exactly.</p>
  
  <p>I hope one of you guys/girls could give me either a solution or point me in the right direction.</p>