title: When are global variables created?
body: <p>I have a piece of code structured like this:</p>
  
  <pre><code>a.cpp:  
      #include "b.hpp"  
      const unsigned a =  create(1);
  
  
  b.cpp:
      map&lt;int, string&gt; something; // global variable
      unsigned create(unsigned a){
          something.insert(make_pair(a, "somestring"));
          return a;
      }
  </code></pre>
  
  <p>Now, this throws out a segfault, valgrind says that map was not yet created. How does it work, how should I change it?</p>