-
-
Save cuttlebit/3d7b321adf6610dabaed to your computer and use it in GitHub Desktop.
Windows version of carneeki's throb...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <windows.h> | |
#define SLEEP 100 // 100 millis | |
using namespace std; | |
void throb(char in) | |
{ | |
cout << "\b" << in; | |
cout.flush(); | |
Sleep(SLEEP); | |
} | |
int main() | |
{ | |
while(true) | |
{ | |
throb('|'); | |
throb('/'); | |
throb('-'); | |
throb('\\'); | |
} | |
return 0; | |
} |
I had to install mingw for this :P
Github needs to add a [Like] or [+1] button for comments. 😄
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I wholeheartedly do not approve of your choice of development platform. :P