I have been coding a project for class am on one small part of the project that I can not figure out how to do.
The problem I am having is trying to figure out how to take string and pull numbers out of it and skip the other chars.
For example the user would enter "5 - 20"
I would take that and have pull out an int 5 and and int 20.
I just can not figure how to do it. If it was just one number it would be easy but pulling 2 different numbers out of the string is what is killing me.
Any help would be great.
The problem I am having is trying to figure out how to take string and pull numbers out of it and skip the other chars.
For example the user would enter "5 - 20"
I would take that and have pull out an int 5 and and int 20.
I just can not figure how to do it. If it was just one number it would be easy but pulling 2 different numbers out of the string is what is killing me.
Any help would be great.