title: error: cannot convert ‘std::ifstream {aka std::basic_ifstream<char>}’ to ‘char**’ for getline() function
body: <p>I had this program working a while ago but I recently came back to look at it for another project I am working on and now I am getting errors while trying to use <code>getline()</code></p>
  <p>The other file is just a text file that has the player's name, their position and other data about them as such:</p>
  <blockquote>
  <p>Bill Quarter_Back 70 0 8754 0 573</p>
  </blockquote>
  <p>before adding :: infront of the getline function I was getting the error</p>
  <blockquote>
  <p>error: no matching function for call to ‘getline(std::ifstream&amp;, int&amp;, char)’</p>
  <pre><code>getline(input, p[i].position, ' '); &quot;
  </code></pre>
  </blockquote>
  <p>and I don't know why.</p>
  <p>Here's the code:</p>
  <pre><code>#include &lt;iostream&gt;
  #include &lt;fstream&gt;
  #include &lt;string&gt;
  
  struct player{
    int position, touchDowns, catches, passingYards, recievingYards, rushingYards;
    std::string name;
  };
  using namespace std;
  
  void printPlayer(player p[], ifstream &amp;input);
  void createArray(player p[], ifstream &amp;input);
  
  int main() {
      ifstream input;
      player p[10];
      int choice;
      while(choice != 99){
        cout &lt;&lt; &quot;Select one of the following options: &quot; &lt;&lt; &quot;1: To print a player's data\n2: To print the entire data\n3: To update a player's touch downs\n4: To update a player's number of catches\n5: To update a player's passing yards\n6: To update a player's receiving yards\n7: To update a player's rushing yards\99: To quit the program&quot; &lt;&lt;endl;
        cin &gt;&gt; choice;
        switch (choice){
          case 1:
          printPlayer(p, input);
          
        }
        if(choice == 99){
          break;
        }
      }
      return 0;
  }
  void createArray(player p[], ifstream &amp;input){
    for(int i =0;i &lt; 10; i++){
      getline(input, p[i].name, ' ');
      getline(input, p[i].position, ' ');
      getline(input, p[i].touchDowns, ' ');
      getline(input, p[i].catches, ' ');
      getline(input, p[i].passingYards, ' ');
      getline(input, p[i].recievingYards);
      getline(input, p[i].rushingYards);
    }
  }
  void printPlayer(player p[], ifstream &amp;input){
    int wantedPlayer;
    string guyname;
    cout &lt;&lt; &quot;Enter players name: &quot;;
    cin &gt;&gt; wantedPlayer;
    cout &lt;&lt; endl;
    for(int i =0; i &lt; 10; i++){
      guyname = p[i].name;
        cout &lt;&lt; p[i].name &lt;&lt; &quot; &quot; &lt;&lt; p[i].position &lt;&lt; &quot; &quot; &lt;&lt; p[i].touchDowns &lt;&lt; &quot; &quot; &lt;&lt; p[i].catches &lt;&lt; &quot; &quot; &lt;&lt; p[i].passingYards &lt;&lt; &quot; &quot; &lt;&lt; p[i].recievingYards &lt;&lt; &quot; &quot; &lt;&lt; p[i].rushingYards &lt;&lt; &quot;\n&quot; &lt;&lt; endl;
    }
  }
  </code></pre>