Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > is there a nice way to read consequtive integers from a character sting

Reply
Thread Tools

is there a nice way to read consequtive integers from a character sting

 
 
DeadInPlastic
Guest
Posts: n/a
 
      06-26-2003
char * blah = "blha222222blah";
i am wondering if there a way to read these 222222 at once. i can read
one char at a time of course but it doesn't work for me since I have
only one digit(i.e . 2) that I can't even convert from char to int.
 
Reply With Quote
 
 
 
 
Karl Heinz Buchegger
Guest
Posts: n/a
 
      06-26-2003


DeadInPlastic wrote:
>
> char * blah = "blha222222blah";
> i am wondering if there a way to read these 222222 at once. i can read
> one char at a time of course but it doesn't work for me since I have
> only one digit(i.e . 2) that I can't even convert from char to int.


So start working on the last part:
given a sequence of characters, each beeing a digit, how do I convert
them to the correspondig number?

Hint: This new question is asked at least 15 times a week. So looking up
previous posts might be a good idea.

--
Karl Heinz Buchegger

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Is there any nice way to unpack a list of unknown size?? Gary Herron Python 2 09-14-2008 07:16 PM
Is there any nice way to unpack a list of unknown size?? srinivasan srinivas Python 0 09-14-2008 02:57 PM
Burned CD's -contents - consequtive additions RobF Computer Support 11 07-04-2007 07:05 PM
Is there a nice way to dynamically call a web service? Chris Bardon ASP .Net Web Services 1 04-29-2004 10:57 PM
These Bee's Don't Sting..... Mark C Digital Photography 1 08-08-2003 06:44 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57