title: Why is this macro generating a syntax error?
body: <p>So this is my code:</p>
  
  <pre><code>// Defines a tuple
  #define __WINDOW__RESOLUTION__ 500, 200 
  
  // Seperate the tuple
  #define __WINDOW__X__1(Width, Height)  (Width)
  #define __WINDOW__Y__1(Width, Height)  (Height)
  
  // Add another sort of indirection because my tuple is a macro
  #define __WINDOW__X__(Macro) __WINDOW__X__1(Macro)
  #define __WINDOW__Y__(Macro) __WINDOW__Y__1(Macro)
  
  // These should be the final values 500 and 200
  #define __WINDOW__RESOLUTION__X__ (__WINDOW__X__(__WINDOW__RESOLUTION__))
  #define __WINDOW__RESOLUTION__Y__ (__WINDOW__Y__(__WINDOW__RESOLUTION__))
  </code></pre>
  
  <p>When i use the first macro where the final number should be something seems to go wrong:</p>
  
  <pre><code>std::cout &lt;&lt; __WINDOW__RESOLUTION__X__ &lt;&lt; std::endl; // Outputs 200 instead of 500
  </code></pre>
  
  <p>above line outputs the number 200, so the Y value instead of the X value</p>
  
  <pre><code>std::cout &lt;&lt; __WINDOW__RESOLUTION__Y__ &lt;&lt; std::endl; // ERR with macro underlined
  </code></pre>
  
  <p>this line won't even compile [ C2059, syntax error: ")" ]</p>
  
  <p>Thank you for helping me Alex</p>