title: extern variable in hierachy of header file
body: <p>Why cant I access the variable value defined in the file.cpp file. Assuming it is linked with main. Tricky part is that the variable value is included indirectly. Main function includes header1.h which in return includes file.h which has variable value as extern. 
  Can extern be propagated in chain of headers like this</p>
  
  <p>1) file.h</p>
  
  <pre><code>extern int value;
  </code></pre>
  
  <p>2)file.cpp</p>
  
  <pre><code>#include "file.h"
  int value = 25;
  </code></pre>
  
  <p>3) header1.h</p>
  
  <pre><code>#include "file.h"
  const int const_value = 100;
  </code></pre>
  
  <p>4) main.cpp</p>
  
  <pre><code>#include "header1.h"
  int main(char *argv[], int args) {
  int result = value*10;      
      return result;
  }
  </code></pre>