A way to search input for a specific character?

Hi, I've been coding A LOT and so I've been wondering lots of things - I feel like I'm spamming the forum. However, I do look for the answers before asking them.

Anyway, I have a code that will perform a certain task with an input. However, I want to make an if statement should there happen to be a decimal in that input. So my question is - Is there a function that can look over the input and determine whether a certain value was entered?

EDIT : It doesn't matter whether the code would be for string or just regular cin - But if there's a way to do it in both (if at all) then that would be great.
Last edited on
The easiest is to read the input into a string and use the find function of the string.
Thanks Thomas! I looked up the find function and it'll work for what I had in mind.
Topic archived. No new replies allowed.