#ifndef RTS_PROGRESSBAR_H #define RTS_PROGRESSBAR_H #include #include using namespace std; static void rtsProgressBar(unsigned int percent) { //std::cout< (float)i/(float)40 *100) bar << "*"; else bar << " "; } bar<<"]"; cout << "\r"; // carriage return back to beginning of line cout << bar.str() << " " << slash[x] << " " << percent << " %"; // print the bars and percentage cout.flush(); x++; // increment to make the slash appear to rotate if(x == 4) x = 0; // reset slash animation } #endif