Wyo C++ Name
-
Ch. 9 Wksht #6
Write a function that accepts a string parameter with a length between or including 1 character and 9 characters. The string will be comprised of digits (0 through 9). The function returns the integer value represented by the parameter.
Write out the complete function definition below following the function header provided.
int convertStringToInt(apstring stringIn)
// precondition: stringIn will only contain digits
// 1
<= length of stringIn <= 9
// postcondition: returns the integer value represented by the stringIn
parameter