Answer the question
In order to leave comments, you need to log in
How to output colored console text in C++?
Hello! Guys who fumbles in C ++? Can you please tell me how to display colored text in C++?
I am writing a console program for practice, you can say a game, and I need if a person wins, then he shows green correct answers, if he loses, then red. I have already implemented and written the idea, but I can’t figure out how to make a color??
Answer the question
In order to leave comments, you need to log in
It all depends on the terminal.
https://stackoverflow.com/questions/33326039/c-ans...
And here is a description of the specifics for windows
https://superuser.com/questions/413073/windows-con...
https://ru.stackoverflow.com/questions/16431/%D0%A...
https://www.cyberforum.ru/cpp-beginners/thread5252...
Ruslan Kirichenko , ANSI escape sequences, in this case specifically for changing colors . The truth is here:
it works on the windows platform, but under linux you need to use crutches here :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question