title: c++ macro output type based on the macro function argument
body: <p>I am trying to define my variable type based on a boolean variable comes into my macro function, but I get compiler error. </p>
  
  <pre><code>#define myImageType(depthImage) ((depthImage)==0 ? int : double)
  
  int main()
  {
  bool inMilimeter = true;
  myImageType(inMilimeter) pixelIntensity;
  }
  </code></pre>