If/Switch statement that always runs

I am making a project, and there are multiple areas in the project where the user enters something, but every time I want it to check for something. Is there a way to make an if or switch statement that will always run for every cin >> ?
Make it a function, and call it every time you use cin.
Good luck!
Thanks!
Actually, you could include cin in your function:

1
2
3
4
5
bool checkSomething(int &var){
    cin >> var;
    if (???) return true;
    else return false;
}


Assuming every cin acts on the same variable type.
Topic archived. No new replies allowed.