fork(12) download
  1. #include <iostream>
  2.  
  3. int main() {
  4. int x(0);
  5. std::cin.exceptions(~std::ios::goodbit);
  6. try{
  7. std::cin >> x;
  8. } catch (std::exception &e){
  9. std::cout<<e.what() << std::endl;
  10. }
  11. return 0;
  12. }
Success #stdin #stdout 0s 3476KB
stdin
Standard input is empty
stdout
basic_ios::clear