I'm writing code that will take a string input (any combination of
digits, letters) and I need it to output the numbers.
Here is the code:
using namespace std;
y = 0, x = 10;
cin >> did;
y = did[i];
My problem is the line y=did[i].
I want to get y to equall the digits in the string.
When you run it the output is some high number not the digit in the string.