From: Silverio Newsgroups: comp.os.msdos.djgpp,comp.lang.c++ Subject: eof problem (CTRL-Z) Date: Tue, 21 Jan 1997 10:51:43 +0000 Organization: Centre Universitaire Lines: 19 Message-ID: <32E49FBE.7289@cu.lu> NNTP-Posting-Host: rossini.infogest.cu.lu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Can anybody explain why the following code works with BC5.0 and does not work with DJGPP gcc version 2.7.2.1 ? The problem is that if the user enters an EOF (CTRL Z in DOS) to stop the loop, the user is not prompted to enter the double d ! #include int main() { int i; while(cin >> i) cout << i << endl; // CTRL Z to stop the loop cin.clear(); // reset the flags double d; cin >> d; // with DJGPP gcc, the user cannot enter a value cout << d << endl; } Many thanks Nino Silverio