how do i go about getting ride of the "-" in the numbers?
1 2 3 4 5 6 7 8 9 10 11 12 13
1) Write a program prompts a user for a telephone
number that requires only one dash in between. The
program then outputs the telephone number without
the dash. The fake phone number can be as long as
the user wants.
Example:
Enter a telephone number: 555-1234
5551234
Enter a telephone number: 99999-245
99999245
There is a function in <cctype> called isdigit(). You can check each digit of the string with isdigit(). If the character is not a digit, just ignore it. Otherwise, copy the digit to your output string.