Advertisement
axyd

C++ Fix cin error state

Oct 20th, 2016
383
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.13 KB | None | 0 0
  1. // Fix cin errors
  2. void Xclass::cleanCin() {
  3.     cout<<"\n\t\t/!\\INVALID INPUT/!\\\n";
  4.     cin.clear();
  5.     cin.get();
  6.     fflush(stdin);
  7. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement