Article View: be.comp.programming
Article #3668Re: binary string als int afdrukken in C
From: Gunter Schelfhout
Date: Sat, 29 Nov 2003 23:44
Date: Sat, 29 Nov 2003 23:44
22 lines
1852 bytes
1852 bytes
Arnold Hendriks wrote: > > "staf wagemakers" <staf_nospam_@patat.org> wrote in message > news:slrnbshhuh.3sc.staf_nospam_@localhost.staflaptop... >> On 2003-11-29, Gunter Schelfhout <nospam@please.com> wrote: >> > Hoe kan een string (bv "1100100101001001") afdrukken als een int in C > met >> > behulp van de functies in glibc? >> > Met printf? >> >> er bestaat hievoor geen standaard functie voor in libc >> ...of ik ken hem niet ;-) > Dat laatste vrees ik :-) > > De functies strtol/strtoul accepteren een 'base' parameter, die in het > gebied 2 (binair) t/m 36 mag liggen. We zullen eens kijken in de documentatie. Bedankt. -- Blood, sweat & tears
Technical Details
Message-ID:
<kbayb.51726$RJ2.1708097@phobos.telenet-ops.be>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!news.space.net!newsfeed.vmunix.org!aotearoa.belnet.be!news.belnet.be!ossa.telenet-ops.be!phobos.telenet-ops.be.POSTED!not-for-mailReferences:
<td1yb.50435$xX1.1629315@phobos.telenet-ops.be> <slrnbshhuh.3sc.staf_nospam_@localhost.staflaptop> <bqaho7$tou$1@netlx020.civ.utwente.nl>Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit X-Google-Thread: fcea4,12763d3d6faef1bf X-Google-Attributes: gidfcea4,public X-Google-ArrivalTime: 2003-11-29 15:44:17 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!news.space.net!newsfeed.vmunix.org!aotearoa.belnet.be!news.belnet.be!ossa.telenet-ops.be!phobos.telenet-ops.be.POSTED!not-for-mail From: Gunter Schelfhout <nospam@please.com> Subject: Re: binary string als int afdrukken in C Newsgroups: be.comp.programming References: <td1yb.50435$xX1.1629315@phobos.telenet-ops.be> <slrnbshhuh.3sc.staf_nospam_@localhost.staflaptop> <bqaho7$tou$1@netlx020.civ.utwente.nl> Lines: 22 User-Agent: KNode/0.7.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit Message-ID: <kbayb.51726$RJ2.1708097@phobos.telenet-ops.be> Date: Sat, 29 Nov 2003 23:44:16 GMT NNTP-Posting-Host: 213.118.155.190 X-Complaints-To: abuse@telenet.be X-Trace: phobos.telenet-ops.be 1070149456 213.118.155.190 (Sun, 30 Nov 2003 00:44:16 MET) NNTP-Posting-Date: Sun, 30 Nov 2003 00:44:16 MET Organization: Telenet Internet