Guest User

Untitled

a guest
Jan 17th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. int main(int argc, const char * argv[])
  2. {
  3. for(int i = 0;;++i)
  4. {
  5. cout << i << endl;
  6. if (_kbhit())
  7. {
  8. int c = _getch();
  9. if (c == 0x1B) break;
  10. }
  11. }
  12. }
  13.  
  14. for(int i = 0;;++i)
  15. {
  16. cout << i << endl;
  17. if(_kbhit())
  18. {
  19. while(_kbhit()) _getch();
  20. }
  21. else
  22. {
  23. _getch();
  24. }
  25. }
  26.  
  27. while(_kbhit()) _getch();
Add Comment
Please, Sign In to add comment