title: reference ambiguous in c++
body: <p>I'm very new to C++ and I'm trying to reproduce a hash table project from youtube. When I'm creating a new project with a new header filr "hash.h", a main.cpp and a hash.cpp, and when I compile and run the main.cpp I get an error saying that my "hash" was ambigious. My thinking is that my hash collided with the std::hash, that's where the errors are from, but I'm not quite sure how to correct it.. please help! This is done in Code::Blocks :)</p>
  
  <p>main.cpp</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;cstdlib&gt;
  #include &lt;string&gt;
  
  #include "hash.h"
  
  using namespace std;
  
  int main(){
      int index;
      hash hashObj;
      index = hashObj.Hash("Amanda");
  
      cout &lt;&lt; index &lt;&lt; endl;
  
      return 0;
  
  }
  </code></pre>
  
  <p>hash.h</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;cstdlib&gt;
  #include &lt;string&gt;
  
  
  #ifndef HASH_H_INCLUDED
  #define HASH_H_INCLUDED
  
  class hash{
  
  public:
      int Hash(std::string key);
  };
  
  
  #endif // HASH_H_INCLUDED
  </code></pre>
  
  <p>hash.cpp</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;cstdlib&gt;
  #include &lt;string&gt;
  
  #include "hash.h"
  
  int hash::Hash(string key){
      int hash = 0;
      int index;
  
      index = key.length();
  
      return index;
  }
  </code></pre>