Ask coding questions
How do you make colored text in c++?is it possible?
Since repl.it uses a Linux compiler, yes, it is possible: https://gist.github.com/vratiu/9780109
for example, if you want black text: "\033[0;30mThis text will be black"
"\033[0;30mThis text will be black"
@DynamicSquid, It's to bad it does not work on windows :(
try replacing \033 to x1b @AbhayBhat
@Coder100, ok i'll try that
these might help you:
hope this helps! =)
please mark this answer as correct if it helped you =)
Hello. You can use ANSI escape codes (the escape code is \x1b):
cout << "\x1b[31mRed Text\x1b[0mNormal text";
View all of them here
@Coder100 Thanks so much!
no problem! @SelenaYang1