title: C++ : global structure
body: <p>In the same way than using global variable,</p>
  
  <pre><code>const double GRAVITY = 9.81;
  
  int main(){}
  </code></pre>
  
  <p>I would like to use global structure</p>
  
  <pre><code>typedef struct {
      double gravity;
  } WorldConfig;
  
  WorldConfig WC;
  WC.gravity = 9.81;
  
  int main(){}
  </code></pre>
  
  <p>but this does not compile ("WC" does not name a type).</p>
  
  <p>Is there a way to do this or alternatively, a good reason why using a global struct would be a super bad idea ?</p>
  
  <p>thx</p>