title: no matching function for call to getline
body: <p>Hi I am working on a school project to read text from a file, and then manipulating it so the output is different. Anyhow, when I try to use the getline function I get a "no matching function for getline". I don't understand why since I seem to have used the right parameters for the function. Any ideas as why this is not working? </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;fstream&gt;
  #include &lt;cctype&gt;
  #include &lt;algorithm&gt;
  using namespace std;
  
  bool isaNoun( const string&amp; noun );
  
  bool isanArticle( string value, string * container, int size);
  
  int main(int argc, char * argv[])
  {    
      char vowels[]={'a','e','i','o','u', 'A', 'E', 'I', 'O', 'U'};
  
      string articles[]={ "a", "A", "an", "An", "aN","AN", "the", "The", "tHe", "thE", "THe", "tHE", "THE"};
      int stringsize=sizeof(articles)/sizeof(articles[0]);// determine size of array
      istream *adr;//location of file to be read.
      string adjective=argv[1];
      cout&lt;&lt;adjective;
      ifstream infile;
  
      if (argc&lt;=2)
          cout&lt;&lt;"Not enough arguments given"&lt;&lt;endl;
      else if(argc==3)//this is where the magic happens.
      {
          infile.open(argv[2]);
  
      }
      if (infile.is_open())
          adr=&amp;infile;
      string aLine;
      getline(&amp;adr, aLine);
      if(adr-&gt;good)
          cout&lt;&lt;oLine&lt;&lt;endl;
  
      return 0;
  }
  //function to check if input is a noun
  bool isaNoun( const string&amp; noun){
  
      return isalpha(noun[0]);
  }
  
  bool isanArticle( string value, string * container, int size)
  {
  
      for(int i=0; i&lt;size;i++)
      {
          if (value==container[i])
          {
              return true;
          }
          cout&lt;&lt;i&lt;&lt;endl;
      }    
      return false;
  }
  </code></pre>