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

D

DeadInPlastic

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.
 
K

Karl Heinz Buchegger

DeadInPlastic said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top