From: calias DOT bbs AT cszone DOT twbbs DOT org (sothat) Newsgroups: comp.os.msdos.djgpp Subject: cin.clear() doesn't work ? Date: 21 May 2000 16:14:19 GMT Organization: 程式設計樂園(CSZone) Lines: 24 Message-ID: <3aUeHi$Qin@cszone.twbbs.org> NNTP-Posting-Host: octa2.ee.ntu.edu.tw X-Trace: gemini.ntu.edu.tw 958926042 1330 140.112.41.138 (21 May 2000 16:20:42 GMT) X-Complaints-To: postmaster AT news DOT ntu DOT edu DOT tw NNTP-Posting-Date: 21 May 2000 16:20:42 GMT X-Filename: n.djgpp/M.958925660.A To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com sorry , i don't know whether it is an old problem ... I write a program which use ctrl-z to terminate an input and then go back to main menu to wait for another command input. but I was encountered a problem : cout << "?" cin >> temp ; cin.get() ; if ( cin.eof() ) cin.clear(); // then i found // cin.eof() , cin.fail() is still 1 and 2 //why can't i clear the cin.eof() and cin.fail() flag with cin.clear()?? //else this code can run well under vc.. -- ※ Origin: 程式設計樂園 ◆ From: sowhat.m1.ntu.edu.tw