title: change namespace variable value from outside (C++)
body: <p>consider the following namespace:</p>
  
  <pre><code>// foo.h
  namespace foo
  {
      extern int bar;
  }
  
  //foo.cpp
  namespace foo
  {
      extern int bar = 42;
  }
  </code></pre>
  
  <p>is there a way to change the value of <code>bar</code> somewhere else in the project (i.e, not inside the namespace)?</p>
  
  <p>I mean something like:</p>
  
  <pre><code>// in some other .cpp file
  #include foo.h
  
  int setBar(int x)
  {
      foo::bar = x;
  }
  </code></pre>