title: g++ compiler is not recognizing inbuilt input() function of lex
body: <p>The code is working fine with gcc compiler. But I need to use g++</p>
  
  <pre><code>error: ‘input’ was not declared in this scope
   while ((c = input()) != 0)  
                     ^
  </code></pre>
  
  <p>This error oocurs after I link it with yacc</p>
  
  <pre><code>static void comment(void)
  {
     int c;
  
     while ((c = input()) != 0)
      if (c == '*')
      {
          while ((c = input()) == '*')
              ;
  
          if (c == '/')
              return;
  
          if (c == 0)
              break;
      }
    yyerror("unterminated comment");
  }
  </code></pre>