title: print character till press enter key
body: <p>I am writing a program to print the character until pressing enter key also tells the total character we entered</p>
  <p>And the error I face is:</p>
  <pre><code>12  20  G:\C++  with OOP\Itration\Do_while\Task_1\printing_num_till_entered.cpp
  [Error] ISO C++ forbids comparison between pointer and integer 
  [-fpermissive]
  </code></pre>
  <pre><code>#include&lt;iostream&gt;
  #include&lt;conio.h&gt;
  using namespace std;
  
  int main()
  {
      //  To print character till press enter key 
      //  also tells the total character we entered
      
      char ch;    
      int counter = 0;
      while(getche() != &quot;\r&quot;)
      {
          counter++;
      }
          cout&lt;&lt;counter;
      
      return 0;
  }
  </code></pre>