title: C++ Getline issues (No instance of overloaded function "getline"
body: <p><strong>I know I know.</strong>
  This question has been asked before, but I've looked at all the answers and none seem to solve my problem. When I use the getline function to get the contents of a line in the file, it doesn't work.</p>
  
  <pre><code>getline(file, line);
  </code></pre>
  
  <p>'File' is declared here:</p>
  
  <pre><code>ifstream File;
  File.open("fruit.txt");
  </code></pre>
  
  <p>and 'line' is declared here:</p>
  
  <pre><code>int line = 0;
  </code></pre>
  
  <p>Getline is underlined in red with this message:</p>
  
  <pre><code>getline
  no instance of overloaded function "getline" matches the argument list
  argument types are :(std::ifstream, int)
  </code></pre>
  
  <p>What this means is no instance of getline has the argument list of the file stream and an integer.</p>
  
  <p>This makes no sense as all the other questions on this matter state exactly that, that the arguments <strong><em>are</em></strong> the file stream and an integer.</p>
  
  <p>What am I doing wrong?</p>
  
  <p>EDIT:</p>
  
  <p>Here is the full code:</p>
  
  <pre><code>ifstream fruitFile;
  fruitFile.open("fruit.txt");
  int line = 0;
  int C_FRUIT = getline(fruitFile, line);
  fruitFile.close();
  </code></pre>
  
  <p>The first line should be a number, and I need it.</p>