Article View: be.comp.programming
Article #1714Re: [Java] Precision los char -> byte
From: Vincent De Baere
Date: Wed, 15 Dec 2004 13:02
Date: Wed, 15 Dec 2004 13:02
28 lines
1710 bytes
1710 bytes
On Wed, 15 Dec 2004 11:56:55 +0100, Aquila wrote:
> Vincent De Baere wrote:
>> string str = "";
>
> hoeft niet, strings worden standaard op "" ge�nitialiseerd
>> int seed(0);
>> int result(0);
>>
> idem voor ints en 0
genoteerd! Ik dacht dat eigenlijk al, maar vermoedde dat het sowieso
weinig kwaad kan dat ook expliciet te initialiseren
>> for(int i = 0; i < 10; i++){
>> cout << "input char"<< endl;
>> cin >> array[i];
>> result = seed ^ (int)array[i];
>
> je hoeft niet te casten naar int want in C++ zijn int en char volledig
> compatibel
Eveneens genoteerd! Bedankt voor de tips!
Vincent
Technical Details
Message-ID:
<pan.2004.12.15.13.02.07.874797@lilly.csoft.net>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!newsfeeder.wxs.nl!newsfeed.multikabel.nl!skynet.be!newspost001!tjb!not-for-mailReferences:
<pan.2004.12.15.10.48.05.274938@lilly.csoft.net> <Xs2dnVReHJXqhV3cRVnysA@scarlet.biz>Show Full Headers
Complete Article Headers
X-Google-Thread: fcea4,344e68e2aa7407 X-Google-Attributes: gidfcea4,public X-Google-Language: DUTCH,ASCII Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!newsfeeder.wxs.nl!newsfeed.multikabel.nl!skynet.be!newspost001!tjb!not-for-mail From: Vincent De Baere <vdebaere@lilly.csoft.net> Subject: Re: [Java] Precision los char -> byte Date: Wed, 15 Dec 2004 14:02:07 +0100 User-Agent: Pan/0.14.2.91 (As She Crawled Across the Table) Message-ID: <pan.2004.12.15.13.02.07.874797@lilly.csoft.net> Newsgroups: be.comp.programming References: <pan.2004.12.15.10.48.05.274938@lilly.csoft.net> <Xs2dnVReHJXqhV3cRVnysA@scarlet.biz> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Lines: 29 Organization: -= Belgacom Usenet Service =- NNTP-Posting-Host: c5424794.news.skynet.be X-Trace: 1103115727 news.skynet.be 13460 81.244.116.35:33456 X-Complaints-To: usenet-abuse@skynet.be