title: C++ using booleans across multiple files
body: <p>//main.cpp </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "worldActions.h"
  using namespace std;
  
  
  bool worldEvents = false;
  
  
  void worldReactions(bool world);
  
  int main (int argc, const char * argv[])
  {
      while (true)
      {
  
          if (worldAction == true)
          {
              worldEvents = true;
              worldReactions(worldEvents);
          }
          else
          {
              worldEvents = false;
              break;
          }
      }
      return 0;
  }
  </code></pre>
  
  <p>//1.cpp</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "worldActions.h"
  using namespace std;
  bool worldAction;
  </code></pre>
  
  <p>//header</p>
  
  <pre><code>#ifndef worldActions_h
  #define worldActions_h
  bool worldAction = true;
  #endif /* defined(__asdf_Story__worldActions__) */
  </code></pre>
  
  <p>When ever extern is used I get linking errors and when it's not I get redefinition errors. How can I fix this so I can use a global boolean? </p>