Ask coding questions

← Back to all posts
scrolling text in c++ (without windows.h)
TsunamiOrSumth

alright, im trying to make scrolling text in c++, and the internet only has answers that include <windows.h>. since I'm pretty sure repl runs on Linux (correct me if I'm wrong), I cant use that, so uh does anyone have any solutions?

Voters
TsunamiOrSumth
Comments
hotnewtop
RYANTADIPARTHI

i think windows is the most viable way. Maybe only way, I'm not sure. but yes, repl runs on linux.

FlaminHotValdez

I think there's a slowprint() method, if that doesn't work maybe have a string variable and use a for-loop to iterate over all the characters and use sleep() to wait between each character.

programmeruser

Basically draw something, clear the terminal, then add whitespace to the beginning of the text and repeat that.

TanushJha

what

TanushJha

i think you should refresh your computer or restart it

TsunamiOrSumth

@TanushJha you are a genius

TanushJha