Hello, I recently added a loading screen in my program, I just need to have a code like a time countdown or a percentage saying if its already %100 the game is loaded like in videogames ..
Is there such a thing or is it possible to have a code like this?
If there is .. Can someone show me the code or an example so I can understand it better.Thank in advance!
Also here is my loading screen code(just got it from another source lol):
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include <iostream>
int main() {
std::cout << "Loading";
std::cout.flush();
for ( ; ; ) {
for (int i = 0; i < 3; i++) {
std::cout << ".";
std::cout.flush();
for(double counter = 0; counter < 100000000; counter++);
}
std::cout << "\b\b\b \b\b\b";
}
return 0;
}