Macro expansion problems when passing parameters
<p>Can't figure out what's going on with this one. This is an example of what I'm trying to do.</p>

<pre><code>class WhatThe
{
 public:
  WhatThe(std::string Type, int channel) {}
  ~WhatThe() {}

  void Doitnow() {}
};

#define DO_SOMETHING_TEST1 WhatThe("TEST1", channel)
#define DO_SOMETHING_TEST2 WhatThe("TEST2", channel)

#define DO_IT(type, channel) \
        DO_SOMETHING_##type.Doitnow()
</code></pre>

<p>then calling </p>

<pre><code>DO_IT(TEST1,1);
</code></pre>

<p>I get an -- error: ‘channel’ was not declared in this scope</p>

<p>Is what I have even possible to do, can you have macros within macros and pass a parameter through them?  I would have thought that</p>

<pre><code>DO_SOMETHING_##type.Doitnow() 
</code></pre>

<p>would end up being expanded to</p>

<pre><code>WhatThe("TEST1", 1).DoitNow()
</code></pre>
