fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. template<class T>
  5. bool make_input(T &param){
  6. bool bmake = false;
  7. if( cin>>param )
  8. bmake = true;
  9. cin.clear();
  10. cin.sync();
  11. }
  12.  
  13. int main(){
  14. int value;
  15. if( make_input(value) )
  16. cout<<value<<endl;
  17. else
  18. cout<<"error"<<endl;
  19. return 0;
  20. }
Success #stdin #stdout 0s 3464KB
stdin
125245564878158
stdout
error