title: Ctrl+Z does not work when trying to exit loop
body: <p>I am trying to exit a loop with <kbd>Ctrl</kbd>+<kbd>Z</kbd>, but it does not work. I have looked carefully my code, but I cannot figure out the problem. Your help will be appreciated. I am using Dev-C++. The code is just bellow:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include&lt;conio.h&gt;
  
  using namespace std;
  
  class student 
  {
    private:
     string name;
     int age;
     double GPA;
    public:
  
     void read ();
  
  };
  
  void student::read()
  {
    do
     {   //enter student data
       cout &lt;&lt; "Name:  " ;
       cin&gt;&gt;name;
       cout&lt;&lt;"Age:  ";
       cin&gt;&gt;age;
       cout &lt;&lt; "GPA:  ";
       cin&gt;&gt;GPA;
  
      cout&lt;&lt;"\n\n  any key to continue or Ctrl+Z to exit."&lt;&lt;endl&lt;&lt;endl;
     }
     while(getch()!=EOF);  //Ctrl+Z to exit
  }
  
  
  int  main()
  {
    student stud;
    stud.read();
    return 0;
  }
  </code></pre>