title: Class declaration in a header file and static variables
body: <p>Noob question, but would like to understand the following:</p>
  
  <p>Imagine I have a <strong>multifile project</strong>. I'm specifying a <strong>class</strong> in a <strong>header file</strong> to be shared among all the files in the project, and I write this : <code>static int test = 0;</code> and in the next line this: <code>static const int MAX = 4;</code></p>
  
  <p>The first one would be an error trying to compile because of the one definition rule. But the second one will compile without errors. Why?</p>
  
  <p>From what I understand, both have the same properties: whole execution storage duration, class scope and no linkage.</p>
  
  <p>Any help?</p>
  
  <p>EDIT: testing an external constant declaration in a header: <code>extern const int MAX = 4;</code> to force external linkage produced the expected error. So I don't understand why with the variable it gives me the error and with the constant it doesn't.</p>