Read the input into a std::string object using cin.getline(). Then attempt conversion of the string to a number using a std::stringstream object. If the conversion is good, it was an integer; if not, tell the user and retry input or give up on the user.
Alternatively, and in a more simplistic way, you can probably test for cin.good(). If == true, then the input was an integer. I personally like better reading into a string first.