title: Which is better #define PI or const double PI?
body: <p>Which is better:</p>
  
  <pre><code>#define PI 3.14
  </code></pre>
  
  <p>or</p>
  
  <pre><code>const double PI = 3.14;
  </code></pre>
  
  <p>This was an interview question, and I don't seem to find an unambiguous answer.</p>
  
  <p>I suppose I should prefer not to use macros, but I'd like to have a sturdy answer to this.</p>
  
  <p><strong>EDIT:</strong> 
  So the <a href="https://stackoverflow.com/questions/6274008/why-would-someone-use-define-to-define-constants">question marked duplicate</a> says, that define "don't respect scopes", but I don't really want scopes here, I want something like a super global, PI must be PI everywhere, should be accessed from anywhere. #define seems more reasonable here to me.</p>
  
  <p>Also I don't see where could using PI go wrong in compile time so please provide an example.</p>