title: getline() function error in c++ code
body: <p>Can someone tell me what am i doing wrong here i am getting an error saying getline() not declared in this scope.........any help would be appreciated. </p>
  
  <p>no matching function for call to getline(char**, size_t*, FILE*&amp;)</p>
  
  <pre><code>    #include&lt;iostream&gt;
      #include&lt;fstream&gt;
      #include&lt;string&gt;
  
      using namespace std;
  
      char *s;
  
      int main(int argc, char *argv[])
      {
          FILE* fd = fopen("input.txt", "r");
          if(fd == NULL)
          {
              fputs("Unable to open input.txt\n", stderr);
              exit(EXIT_FAILURE);
          }
  
          size_t length = 0;
          ssize_t read;
          const char* backup;
  
          while ((read = getline(&amp;s, &amp;length, fd) ) &gt; 0)
          {
              backup = s;
              if (A() &amp;&amp; *s == '\n')
              {
                  printf("%sis in the language\n", backup);
              }
              else
              {
                  fprintf(stderr, "%sis not in the language\n", backup);
              }
          }
          fclose(fd);
  
          return 0;
      }
  </code></pre>