X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: Andrew Cottrell Newsgroups: comp.os.msdos.djgpp Subject: Re: XP and cin Date: Sat, 05 Jan 2002 17:38:14 +1100 Organization: The Internet Group (Sydney) Lines: 43 Message-ID: References: NNTP-Posting-Host: p137-tnt2.syd.ihug.com.au Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: bugstomper.ihug.com.au 1010212679 6906 203.173.130.137 (5 Jan 2002 06:37:59 GMT) X-Newsreader: Forte Agent 1.8/32.548 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com >Ther is a problem under WinXP with cin - some strange characters are >insted of that what You write, cout is ok, i.e. >{ cout<<"Name ?"; cin>>s; } >results on Win98 in : I compield the following small test program and it worked fine on XP with SP1. I am currently using GCC 3.03 snapshot from Andris's GCC test page (recompiled with latest LIBC from last weekend). #include int main() { int cin_integer; char cin_string[100]; cout<<"Test start."<< endl; cout<<"Integer input test."<< endl; cin>>cin_integer; cout<<"String input test." << endl; cin>>cin_string; cout<<"Integer =" << cin_integer<< endl; cout<<"String =" << cin_string << endl; cout<<"Test end."<< endl; return(0); } Test results:- DJGPP_204 D:\dj204\work\cpp>test Test start. Integer input test. 12345 String input test. testing12345 Integer =12345 String =testing12345 Test end.