title: Static const vs const in global variable
body: <p>In Foo.h I define 1 global variable as</p>
  
  <pre><code>static const int g_var = 4;
  </code></pre>
  
  <p>Then I include this header file in many different header files and .cpp files. If I just write</p>
  
  <pre><code>int g_var = 4;
  </code></pre>
  
  <p>I get errors "g_var already defined in", which is understandable, so I had to add static so it is just initialized once. But using</p>
  
  <pre><code>const int g_var = 4; 
  </code></pre>
  
  <p>solves the "already defined in" problem. I read that this is because const global variables have internal linkage by default. So is the keyword static here redundant?</p>