How to slowprint c++ ( EASY EDITION)
hi guys, have you wondered how to slowprint in c++? well I have a super simple solution that anybody can do... it takes less than 5 min to code and you will be on your way... Good luck!
using namespace std;
using namespace std::this_thread;
using Time = chrono::milliseconds;
ewww nooo
also this is better:
#include <iostream>
#include <chrono>
#include <thread>
#include <string>
void sp(std::string str, int delay){
for(auto v:str){
std::cout << v << std::flush;
std::this_thread::sleep_for(std::chrono::milliseconds(delay));
}
}
It allows you to customize how many milliseconds you want.
@JasonLiu19 it literally works the same
@KarterBeaver and it is ver efficient... how i did it.. the time = chrono... is to make it easier
@KarterBeaver you can add delay
@KarterBeaver It isn't good for practical use. For small programs maybe, but for large programs it is likely you are going to get stuck in a namespace error.
@JasonLiu19 well i didnt make it for huge programs... I just made it for beginners that want a easy code to slowprint
@KarterBeaver your delay is set, while people who use mine can set it to 45
or 100
or 87231797
.
@WoahJamalChill This program really helped me, thanks!
@JaydenSavarinat no problem!