From: Silverio Newsgroups: comp.lang.c++,comp.os.msdos.djgpp Subject: EOF Date: Wed, 22 Jan 1997 15:54:36 +0000 Organization: Centre Universitaire Lines: 21 Message-ID: <32E6383C.750D@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 I repost this message because I didn't receive any help :-( 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