Checking cin input stream produces an integer
问题 I was typing this and it asks the user to input two integers which will then become variables. From there it will carry out simple operations. How do I get the computer to check if what is entered is an integer or not? And if not, ask the user to type an integer in. For example: if someone inputs "a" instead of 2, then it will tell them to reenter a number. Thanks #include <iostream> using namespace std; int main () { int firstvariable; int secondvariable; float float1; float float2; cout <<