Created
February 3, 2016 16:21
-
-
Save cmckni3/ef69e5a9a09e032aa36a to your computer and use it in GitHub Desktop.
progressbar.cpp
This file contains hidden or 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> | |
using namespace std; | |
int main() | |
{ | |
int count = 0; | |
string temp = ""; | |
while (count < 10) | |
{ | |
temp += "*"; | |
cout << temp << "\r"; | |
cout.flush(); | |
sleep(1); | |
count++; | |
} | |
cout << "done " << endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment