title: #defining constants in C++
body: <p>In various C code, I see constants defined like this:</p>
  
  <pre><code>#define T 100
  </code></pre>
  
  <p>Whereas in C++ examples, it is almost always:</p>
  
  <pre><code>const int T = 100;
  </code></pre>
  
  <p>It is my understanding that in the first case, the preprocessor will replace every instance of T with 100. In the second example, T is actually stored in memory.</p>
  
  <p>Is it considered bad programming practice to #define constants in C++?</p>