How to add color and slowprint in C++
I have a question.
How do you add color to a C++ text and make it go in Slow print?
Voters
CODER34352 (7)
@ch1ck3n Nice, but i also want it to slowprint
Ask coding questions
I have a question.
How do you add color to a C++ text and make it go in Slow print?
@ch1ck3n Nice, but i also want it to slowprint
Time is in milliseconds, like most things.
@Coder100
Thank you,
I found all the code in your other comment about slowprint[C++]
#include <iostream>
#include <string>
#include <thread>
#include <chrono>
using namespace std;
void slow_print(const string& message, unsigned int millis_per_char=10) {
for (const char c : message) {
// flush is used to make sure the console is empty
cout << c << flush;
}
}
int main() {
cout << "\033[0;34m" << endl;
slow_print("Welcome To the Karate Dojo", 50);
}
I found the other code about color in a website after years of looking.
Lol
Mark as correct answer? @CODER34352