title: C++ macro - capitalize string
body: <p>I'm using preprocessor macros to declare some repetitive variables, specifically:</p>
  
  <pre><code>QuitCallbackType quitCallback;
  LossCallbackType lossCallback;
  PauseCallbackType pauseCallback;
  KeyCallbackType keyCallback;
  MouseCallbackType mouseCallback;</code></pre>
  
  <p>I'd like to use a preprocessor macro to do it, a la</p>
  
  <pre><code>
  CREATE_CALLBACK_STORAGE(quit)
  CREATE_CALLBACK_STORAGE(loss)
  CREATE_CALLBACK_STORAGE(pause)
  CREATE_CALLBACK_STORAGE(key)
  CREATE_CALLBACK_STORAGE(mouse)
  </code></pre>
  
  <p>where it would essentially be like this:</p>
  
  <pre><code>#define CREATE_CALLBACK_STORAGE(x) capitalize(x)##CallbackType x##CallBack;</code></pre>
  
  <p>Is there a way to do this, so that I don't have to pass in both the capitalized AND lowercase versions of each name?</p>
  
  <p>I realize it's not much less typing to use macros, but the problem itself began intriguing me.</p>