using a # from a string

I have a string based program, and you need to use the first input as the operation (i.e add, subtract) and the number after the command (for example add3, but it can be any number from 1 - 8) to determine how many letters at the end (or the beginning if its subtract) of the other input (an 8 letter string composed of letters from a-h) to delete. But the first input that contains the operation AND the number is a string. I tried using a substring with where that number would be and using it in my string.erase(#, 8) where # is an int or a string but you cant do that.
closed account (Dy7SLyTq)
use c. look up getch and putch
Is there a space separating the operator from the number?

(You don't have to use C, getch, or putch btw - that's just if you can't use C++)
can you list a few examples illustrating various components of the input(s).
Topic archived. No new replies allowed.