guitar-player

good_progress_bar.cpp

Feb 26th, 2012
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <unistd.h>
  3.  
  4. const int SECOND = 1000000; //one second = 1x10^6 microseconds
  5. using namespace std;
  6.  
  7.  
  8. int main()
  9. {
  10.  
  11.  for (int i = 0; i <= 10; i++)
  12.  {
  13.   cout << ".";
  14.   cout.flush ();
  15.   usleep (0.5 * SECOND);
  16.  }
  17.  
  18.  cout << endl;
  19.  return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment