Write function that accepts a character string of digits


Problem:

Question- Write a C++ function that accepts a character string of digits and converts that string to the corresponding number, and a test program that demonstrates that your function works correctly. Your function should meet the following requirements: 1. Your function should accept a single text - string argument, as shown in the textbook instructions. 2. It must not use any string or C - string functions to convert the text (no cheating) 3. It must not modify the original input string 4 It must be implemented as a recursive function (that's the point of the lesson) 5. It should accept any string that represents a valid inte ger value, including negative numbers 6. It should ignore initial spaces, as in " 34" 7. It should work properly if the string has initial zeros, as in "0034" 8. It should recognize when it encounters invalid characters, put out an error message, and return zero as its value.

Please show code with comments so I can follow what you are doing.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write function that accepts a character string of digits
Reference No:- TGS0894019

Expected delivery within 24 Hours