Article View: borland.public.cppbuilder.nativeapi
Article #4972Re: converting a hex string to an int with atoi ?
From: Jonathan Benedicto
Date: Tue, 18 Oct 2005 16:38
Date: Tue, 18 Oct 2005 16:38
16 lines
1193 bytes
1193 bytes
Peter wrote: > is it possible to tell atoi the text input is hex somehow ? I'd use stringstream. Eg: #include <sstream> std::stringstream ss; int value; ss.str( "FF" ); ss >> std::hex >> value; HTH Jonathan
Technical Details
Message-ID:
<43552467$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<435515ce@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,5978392de90893ce X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Jonathan Benedicto" <incorrect@no.server> Newsgroups: borland.public.cppbuilder.nativeapi References: <435515ce@newsgroups.borland.com> Subject: Re: converting a hex string to an int with atoi ? Date: Tue, 18 Oct 2005 12:38:37 -0400 Lines: 18 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2670 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 69.158.113.161 Message-ID: <43552467$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1129653351 69.158.113.161 (18 Oct 2005 09:35:51 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail