From: "bowman" Newsgroups: comp.os.msdos.djgpp References: Subject: Re: Challenge for C++ programmers: Lines: 13 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2014.211 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 Message-ID: Date: Sun, 18 Apr 1999 08:13:21 -0600 NNTP-Posting-Host: 208.4.224.38 X-Trace: newsfeed.slurp.net 924444824 208.4.224.38 (Sun, 18 Apr 1999 09:13:44 CDT) NNTP-Posting-Date: Sun, 18 Apr 1999 09:13:44 CDT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Eli Zaretskii wrote in message news:Pine DOT SUN DOT 3 DOT 91 DOT 990418140925 DOT 22615c-100000 AT is... > > I don't know much about iostreams, but all you need to do to get this > effect is to switch stdin to binary mode. ANSI C has `freopen' (since > a call to `setmode' is out, because it's non-standard). If C++ has > something similar, you won't need more than 10 lines for this one ;-). Actually, Stroustrup shows a two-liner. I can't get it to compile, but I only speak enough C++ to deal with MSVC++ .