0
Text color in C++
I'm curious about text color in C++. How can I create colored text in C++ programs ? How can print it on screen with cout instead of cprintf(). I'm using Code::Blocks 17.12
6 Respostas
+ 2
For Windows just google “SetConsoleTextAttribute”. You’ll find the MSDN help and some good and easy examples.
+ 2
Standard C++ console output does not support colors. You have to use platform specific extensions to set the text color (foreground or background). Tell us what operating system you are developing under.
+ 2
For *nix you’ll have to use ANSI escape sequences.
+ 1
windows for now
+ 1
but what about linux. Because my primary OS is linux
0
@Marius Heise I'm using batch commands with system() to change text color but there is little problem. Can you help me ?