Color c++ | SoloLearn: Learn to code for FREE!


Color c++

How can i insert color in c++

8/31/2018 6:39:18 PM

Gabriele Cusano

3 Answers

New Answer


Output? ANSI escape sequences have color-setting commands. You can use them directly: cout << "\x1b[32m;" << "green text"; or here's an import: so you can: cout << ansi::green << "text"; It also detects terminal type so it won't output escape sequences to incompatible streams.


you would use a graphics library like SDL. not available on SoloLearn however.