I wont to check whether the age is number or not in this example it will accept 1E as number while it will not accept E1, I wont to accept only digit
not any symbol or alphabet
int main()
{
int age= 0;
std::cin >> age;
if (std::cin.fail())
{
std::cout << "I failed, try again ..." << std::endl;
std::cin.clear(); // reset the failed state
}