Batalf
asked on
handling a string
Hi
I have a textfile containing text and numbers, like this :
Abc 34yfg 690
5 90 8
1
What I need is a short function on how to extract the numbers from this text and add them together.
The text above = 34 + 690 + 5 + 90 + 8 +1
I have a textfile containing text and numbers, like this :
Abc 34yfg 690
5 90 8
1
What I need is a short function on how to extract the numbers from this text and add them together.
The text above = 34 + 690 + 5 + 90 + 8 +1
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
There is a simple function to test if a character is a digit, int isdigit(int thechar).