As Stoned Coder has pointed out if all you want to do is this, then exceptions would be pointless. If you're want to use exceptions for different types of input throughout your program and it's larger than a few functions/classes, then you could create an exception class -
Code:
#include <iostream>
using namespace std;
class InputError
{
static char* errors[];
public:
static char* reterror(int i){
//error checking required
return errors[i];
}
};
//add more errors
char* InputError::errors [] = {"you'll have to input an integer....."};
int main()
{
try
{
int i;
cin >>i;
if(cin.fail())throw InputError::reterror(0);
}
catch(char* err)
{
cout << err << endl;
}
}