Please give me a hand in this coding>?
i have been trying to create a loading function for my program>
its been months and all i could do that is with stdio.h>pritf..
like in old c++. and i had to mix my program with iostream>cout..
i have found this below coding from internet and its not working.
anyone know how to do this easier way with iostream only?
--------------------------------------…
#include <iostream>
using namespace std;
void DrawProgressBar(int len, double percent) {
cout << "\x1B[2K"; // Erase the entire current line.
cout << "\x1B[0E"; // Move to the beginning of the current line.
string progress;
for (int i = 0; i < len; ++i) {
if (i < static_cast<int>(len * percent)) {
progress += "=";
} else {
progress += " ";
}
}
cout << "[" << progress << "] " << static_cast<int>(100 * percent) << "%";
flush(cout);
--------------------------------------…
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment