Subtract integer from string

Hi! I'm sorry if this topic is repeat.
I want to subtract 4567 from this string "the number is 4567 and it's not ok" and then convert it to an int.
How can i do that with the std?
Thanks a lot!
Break string into individual words. This is commonly called tokenizing and there is much to read about it on the web.

Check each string to see if it is a number. This is also a commonly solved problem that you'll have no trouble tracking down.

When you find one that is, convert it to int.
Last edited on
Topic archived. No new replies allowed.