Article View: be.comp.programming
Article #1337Re: omzetten van integer naar char
From: JanC
Date: Fri, 27 May 2005 23:11
Date: Fri, 27 May 2005 23:11
14 lines
1676 bytes
1676 bytes
Op Thu, 26 May 2005 16:00:50 +0000, schreef Philip Paeps: >> In C kan je allerlei typen variabelen door elkaar gebruiken zonder >> foutmeldingen te krijgen, je kan dus gewoon een letterlijke char '0' >> gebruiken ipv die hexadecimale waarde, en daar 0 of 1 bij optellen. >> >> cijferteken0of1 = "0" + (x % 2); > > Je bedoelt '0', niet "0", die laatste is een const char * met 0\0 erin. Ja, zoals in de tekst erboven wel juist stond. :-) -- JanC
Technical Details
Message-ID:
<pan.2005.05.27.23.11.34.381479@janc.invalid>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsgate.cistron.nl!aotearoa.belnet.be!news.belnet.be!nntp.telenet.be!kwabbernoot.telenet-ops.be!phobos.telenet-ops.be.POSTED!not-for-mailReferences:
<hpmdndIYErxoVQnfRVnytg@scarlet.biz> <slrnd99v8t.m2.philip+usenet@fasolt.home.paeps.cx> <_e2dndyubqUQXwjfRVnyvg@scarlet.biz> <pan.2005.05.26.15.51.16.723266@janc.invalid> <slrnd9bsli.smh.philip+usenet@fasolt.home.paeps.cx>Show Full Headers
Complete Article Headers
X-Google-Thread: fcea4,c59addd1ec4c7578 X-Google-Attributes: gidfcea4,public X-Google-Language: DUTCH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsgate.cistron.nl!aotearoa.belnet.be!news.belnet.be!nntp.telenet.be!kwabbernoot.telenet-ops.be!phobos.telenet-ops.be.POSTED!not-for-mail From: JanC <usenet@janc.invalid> Organization: JanC Subject: Re: omzetten van integer naar char User-Agent: Pan/0.14.2.91 (As She Crawled Across the Table (Debian GNU/Linux)) Message-ID: <pan.2005.05.27.23.11.34.381479@janc.invalid> Newsgroups: be.comp.programming References: <hpmdndIYErxoVQnfRVnytg@scarlet.biz> <slrnd99v8t.m2.philip+usenet@fasolt.home.paeps.cx> <_e2dndyubqUQXwjfRVnyvg@scarlet.biz> <pan.2005.05.26.15.51.16.723266@janc.invalid> <slrnd9bsli.smh.philip+usenet@fasolt.home.paeps.cx> Reply-To: usenet@janc.cjb.net MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit Lines: 14 Date: Fri, 27 May 2005 23:11:16 GMT NNTP-Posting-Host: 213.118.75.16 X-Complaints-To: abuse@telenet.be X-Trace: phobos.telenet-ops.be 1117235476 213.118.75.16 (Sat, 28 May 2005 01:11:16 MEST) NNTP-Posting-Date: Sat, 28 May 2005 01:11:16 MEST