title: no instance of overloaded function matches argument list C++
body: <p>I just have a very basic class that gives with functions that return the winning team of a match.</p>
  
  <p>here's team.cpp</p>
  
  <pre><code>class teams
  {
  string teamName;
  string teamName2;
  int score;
  int score2;
  
  public:
  teams ();
  void set_team1();
  void set_team2();
  string get_score()
  {
      if (score &gt; score2)
      {
          return teamName;
      }
      else
      {
          return teamName2;
      }
  }
  
  private:
  void teams::set_team1(string teamName, int score)
  {
      this-&gt;teamName=teamName;
      this-&gt;score=score;
  }
  void teams::set_team2(string teamName2, int score2)
  {
      this-&gt;teamName2=teamName2;
      this-&gt;score2=score2;
  }
  };    
  </code></pre>
  
  <p>and here's is the line where i'm getting the error in the main method. I'm trying to create a teams object.</p>
  
  <pre><code>    firstTeam.set_team1(teamName, score);
      firstTeam.set_team2(teamName2, score2);
  </code></pre>
  
  <p>Visual studio comes up and says "error: no instance of overloaded function "team::set_team1" matches the argument list".</p>
  
  <p>What am I missing?</p>
  
  <p>This is the exact error I get:</p>
  
  <pre><code>1&gt;c:\users\lab8.cpp(31): error C2664: 'void teams::set_team1(std::string,int)' : cannot     convert parameter 1 from 'std::vector&lt;_Ty&gt;' to 'std::string'
  1&gt;          with
  1&gt;          [
  1&gt;              _Ty=std::string
  1&gt;          ]
  1&gt;          No user-defined-conversion operator available that can perform this     conversion, or the operator cannot be called
  1&gt;c:\users\lab8.cpp(32): error C2664: 'void teams::set_team2(std::string,int)' : cannot convert parameter 1 from 'std::vector&lt;_Ty&gt;' to 'std::string'
  1&gt;          with
  1&gt;          [
  1&gt;              _Ty=std::string
  1&gt;          ]
  1&gt;          No user-defined-conversion operator available that can perform this     conversion, or the operator cannot be called
  1&gt;  Generating Code...
  1&gt;
  1&gt;Build FAILED.
  </code></pre>