I need to take in the following string and split it into two strings: one before the hyphen, and one after the hyphen. I then need to change the data type to an int. However I need to use cin.
Here is the string: 1-6
I tried using other methods, although my lecturer said I'm not allowed to.