title: What happens when there are two functions with the same signature in the same namespace?
body: <p>As far as I understand, I can use namespaces to avoid functions overriding each other. But what if the namespaces have the same names?</p>
  
  <p>I included both of the .h files below, called VideoLibrary::check() and it compiles. Why? Doesn't it contradict the purpose of namespace?</p>
  
  <p>file1.h and file2.h:</p>
  
  <pre><code>namespace VideoLibrary
  {
    void check();
  }
  </code></pre>
  
  <p>file1.cpp: </p>
  
  <pre><code>namespace VideoLibrary
  {
    void check()
      {
          printf("check1");
      }
  }
  </code></pre>
  
  <p>file2.cpp:</p>
  
  <pre><code>namespace VideoLibrary
  {
    void check()
      {
          printf("check2");
      }
  }
  </code></pre>
  
  <p>I'm concerned mostly because my project includes external libraries, and i'm worrying it includes functions with the same signature as in my project. How can I get any error for such a case in compilation time?
  I'm using Xcode as an editor if it matters.</p>