473,378 Members | 1,346 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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

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.
Jul 19 '05 #1
1 1745


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
kb******@gascad.at
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Nicholas | last post by:
How can I compare char* with integers and characters contained in the str, where integers can be one digit or more? void Access(char *str) { char *pt = str; while (pt != '0') { if...
3
by: Sobhan | last post by:
Hi all, I am writing a program in C in which I need to read a data file and export to the excel.The Data in the file in CSV format. Values in the .txt file are as follows: "a","b","c" 10,20,30...
35
by: Durgesh Sharma | last post by:
I want to use strrchar(source_string,last_char ) function from string.h header file,to find out the last occurrence of the NON SPACE Alphanumeric Character. Then i will put a NULL CHAR after...
17
by: henrytcy | last post by:
Hi, How can I get a digit from integer for example, 12311, one by one for comparision? Thanks!
0
by: almurph | last post by:
Hi, Hope you can help me. This is a trick one - at least I think so. I have 2 strings. I have to calculate the "score" of the strings. Score is determined by matching patterns of letters within...
9
by: Justme | last post by:
Novice programmer needs help with using fgets to read and ignore the first two lines of a file. I've gone thru the previous posting regarding fgets, but none of them seems to help my situation. I...
5
by: Kenneth Lantrip | last post by:
Im trying to learn a little more about C compilers. Im trying to work with 64 bit numbers (integers) with the gcc compiler in linux (ubuntu). I need to know how to make use of 64 bit numbers. ...
3
by: dOleAviSc | last post by:
i have an input file with several numbers (ie 73296^4832 /n) carrot being a space and /n meaning theres another line of similar type numbers underneath. i'm trying to read them in one at a time into...
6
by: rohit | last post by:
Hi All, I am new to C language.I want to read integers from a text file and want to do some operation in the main program.To be more specific I need to multiply each of these integers with another...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.