cout<<"\n\n any key to continue or Ctrl+Z to exit."; how to hide the pressed key?
<p>At the end of my loop I have:</p>

<pre><code>cout&lt;&lt;"\n\n  any key to continue or Ctrl+Z to exit.";
</code></pre>

<p>It allows the user to continue entering data, or to exit by pressing <kbd>Ctrl</kbd><kbd>Z</kbd>. I would like to hide the pressed key when  the user decides to continue entering data.</p>

<p>I don't want the pressed key to appear when the user press any key to stay in the loop. How can I do that? I am using Dev-C++. the code of my function is below.</p>

<pre><code>void student::read()
{
    char response;  ofstream OS ("student.dat", ios::app);

    do
    {
        cout&lt;&lt;"Name: ";
        cin&gt;&gt;name;
        cout&lt;&lt;"Age: ";
        cin&gt;&gt;age;
        cout&lt;&lt;"GPA: ";
        cin&gt;&gt;GPA;

        //calling writefile to write into the file student.dat
        student::writefile();
        cout&lt;&lt;"\n\n  any key to continue or Ctrl+Z to exit."&lt;&lt;endl&lt;&lt;endl;

        cin&gt;&gt;response;
        cin.ignore();

    }
    while(cin);  //Ctrl+Z to exit
}
</code></pre>
