Question: in c plus lenge activity 8 . 6 . 1 : Write a function that cleans a string containing an integer and converts it .

in c plus lenge activity
8.6.1: Write a function that cleans a string containing an integer and converts it.
577648.3479862.qx3zqy7
When reading data from a text file, it is common to see numbers such as 12,345, $20, or 195*.
Write a function that cleans a string containing digits by removing any characters that are not a digit or a - sign. Then convert to an integer and return the result.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!