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

0

Color c++

How can i insert color in c++

8/31/2018 6:39:18 PM

Gabriele Cusano

3 Answers

New Answer

+2

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

+1

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

0