Article View: be.comp.programming
Article #3130Re: C++ beginnersvraagje (opruimen invoerbuffer vs. ISO C++)
From: Tom
Date: Mon, 16 Feb 2004 13:01
Date: Mon, 16 Feb 2004 13:01
27 lines
1633 bytes
1633 bytes
[Monday 16 February 2004 13:55] Me... in be.comp.programming:
>> 10 char x;
>> 11 do
>> 12 {
>> 13 cin.get(x);
>> 14 }
>> 15 while (x != "\n");
>
> while ( x != '\n' )
>
> "\n" is een ptr to char
> x is een char
Hm. Zo werkt het inderdaad. Al snap ik nog steeds niet waarom... :-) Ik
bedoel, "\n" is een ptr to char -- ik neem het graag van je aan, maar
dan is er toch nog steeds een (poging tot) vergelijking tussen een
pointer en een char en niet tussen een pointer en een integer?
Soit. Alleszins bedankt!
Tom
--
"Mongolian drivers do not care much about pedestrians."
--
np: Pan Sonic - Vaihtovirta (mp3)
Technical Details
Message-ID:
<11118286.0JFnkDPSpp@zukunft.mine.nu>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!transit.news.xs4all.nl!newsfeed.xs4all.nl!xs4all!not-for-mailReferences:
<3569702.53VcGO01Ky@zukunft.mine.nu> <V43Yb.3286$gg7.259177@phobos.telenet-ops.be>Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit X-Google-Thread: fcea4,dbbf4bce161e9202 X-Google-Attributes: gidfcea4,public X-Google-ArrivalTime: 2004-02-16 05:01:20 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!transit.news.xs4all.nl!newsfeed.xs4all.nl!xs4all!not-for-mail Message-ID: <11118286.0JFnkDPSpp@zukunft.mine.nu> From: Tom <tom @ abwaerts . be> Subject: Re: C++ beginnersvraagje (opruimen invoerbuffer vs. ISO C++) Newsgroups: be.comp.programming Reply-To: tom@verbreyt.be Date: Mon, 16 Feb 2004 14:01:20 +0100 References: <3569702.53VcGO01Ky@zukunft.mine.nu> <V43Yb.3286$gg7.259177@phobos.telenet-ops.be> User-Agent: KNode/0.7.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit Lines: 27 NNTP-Posting-Date: 16 Feb 2004 14:01:20 CET NNTP-Posting-Host: 195.144.90.21 X-Trace: 1076936480 news.xs4all.nl 558 [::ffff:195.144.90.21]:62481 X-Complaints-To: abuse@xs4all.nl