title: Declaration in .h. Definition in .cpp. Correct?
body: <p>It's incredible.  Over 30 years I've been programming and I seem to have forgotten how to handle global variables.  (It's because I never really use them I guess.)  In the header file I have -</p>
  
  <pre><code>// any.h
  bool neat;
  </code></pre>
  
  <p>and in the cpp -</p>
  
  <pre><code>// any.cpp
  #include &lt;any.h&gt;
  bool neat = false;
  </code></pre>
  
  <p>it told me I was redefining.  So I took out the 'bool' - </p>
  
  <pre><code>// any.cpp
  #include &lt;any.h&gt;
  neat = false;
  </code></pre>
  
  <p>Now it tells me "<strong>error: ‘neat’ does not name a type</strong>"
  How can it not know 'neat' is a bool?  It's the same translation unit 
  so I don't need an <strong>extern</strong>.  I haven't declared anything <strong>static</strong> 
  so I know there is no limitation to file scope.  This is supposed to be 
  a global variable.</p>
  
  <p>My understanding of the difference between declaring and defining is 
  that with 'declaring' you are just informing the compiler a name is 
  of a certain type.  Whereas with 'defining' the compiler actually sets 
  aside some space in the executable for the name to exist.  </p>
  
  <p>What am I doing wrong?</p>