c++ cin exception handling code example Example: cin exceptions c++ cin.exceptions(ios_base::failbit);