title: Function " was not declared in this scope"
body: <p>I'm new to C++ and I am attempting to write a program that simulates a football game. I'm getting a compiler error that says the functions get_rank, get_player, and get_name are not declared in this scope. Any help is greatly appreciated!</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;fstream&gt;
  #include &lt;string&gt;
  
  using namespace std;
  
  class Player {
      int playerNum;
      string playerPos;
      float playerRank;
      public:
          void set_values(int, string, float);
          float get_rank(){ return playerRank; };
  };
  
  class Team {
      Player team[];
      string teamName;
      public:
          void set_values(Player[],string);
          Player get_player(int a) { return team[a]; };
          string get_name() { return teamName; };
  };
  
  
  void play(Team t1, Team t2){
      float t1rank = 0.0;
      float t2rank = 0.0;
      for(int i=0; i&lt;11; i++){
          t1rank += get_rank(get_player(t1, i));
      }
      for(int j=0; j&lt;11; j++){
          t2rank += get_rank(get_player(t2, j));
      }
      if(t1rank&gt;t2rank){
          cout &lt;&lt; get_name(t1) + " wins!";
      }
      else if(t2rank&gt;t1rank){
          cout &lt;&lt; get_name(t2) + " wins!";
      }
      else{
          cout &lt;&lt; "It was a tie!";
      }
  }
  </code></pre>