Skip to content

Instantly share code, notes, and snippets.

@cuttlebit
Forked from carneeki/throbber.cpp
Last active August 29, 2015 14:11
Show Gist options
  • Save cuttlebit/3d7b321adf6610dabaed to your computer and use it in GitHub Desktop.
Save cuttlebit/3d7b321adf6610dabaed to your computer and use it in GitHub Desktop.
Windows version of carneeki's throb...
#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;
}
@carneeki
Copy link

I wholeheartedly do not approve of your choice of development platform. :P

@cuttlebit
Copy link
Author

I had to install mingw for this :P

@carneeki
Copy link

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