Type macros in C++ : <pre><code>     #define int double
     #define double int


     int a = 5.5;
     double f = 5.5;

     cout &lt;&lt; a &lt;&lt; " " &lt;&lt; f &lt;&lt; endl;
</code></pre>

<p>Following code snippet actually outputs 5 5.5, meaning int actually means int, and double actually means double.</p>

<p>I am wondering how does that make sense? 
I could either believe both int and double meaning int, if defines are executed one after another, or two of them changing their meaning (if both of them are executed simultaneously), but I can't find proper explanation for this behaviour.</p>

<p>Why does this happen?</p>
