title: c++ multiple definitions of a variable
body: <p>I have 4 files (2 headers, and 2 code files).
  FileA.cpp, FileA.h, FileB.cpp, FileB.h</p>
  
  <p>FileA.cpp:</p>
  
  <pre><code>#include "FileA.h"
  
  int main()
  {
      hello();
      return 0;
  }
  
  void hello()
  {
      //code here
  }
  </code></pre>
  
  <p>FileA.h:</p>
  
  <pre><code>#ifndef FILEA_H_
  #define FILEA_H_
  #include "FileB.h"
  void hello();
  
  #endif /* FILEA_H_ */
  </code></pre>
  
  <p>FileB.cpp:</p>
  
  <pre><code>#include "FileB.h"
  
  void world()
  {
      //more code;
  }
  </code></pre>
  
  <p>FileB.h:</p>
  
  <pre><code>#ifndef FILEB_H_
  #define FILEB_H_
  
  int wat;
  void world();
  
  
  #endif /* FILEB_H_ */
  </code></pre>
  
  <p>when I try to compile(with eclipse), I get " multiple definition of `wat' "
  And I don't know why, it seems as it should work just fine.</p>