0
How to add colour to text in c++?
#include <iostream> using namespace std; int main() { cout << "******* \n * \n * \n * \n * \n * \n******* \n\n"; cout << " * \n * \n * \n * \n * \n ****** \n\n"; cout << " * \n * * \n * * \n * * \n *\n\n"; cout << " * * \n * * \n * * * \n\n"; cout << " **** \n * \n **** \n * \n ****\n\n"; cout << " * * * * \n ** ** * * \n * * * * * \n * * * \n * * *"; return 0; }
9 Respuestas
+ 3
Gordie
Not only PS, but also the regular old command prompt. 😃
also i definitely didn't just brick my brand new oneplus 5t
+ 2
A recent windows 10 update brought ANSI escape to 32 win console. I suppose it's part of their effort to emulate Linux on Windows.
+ 1
There is no (standard) cross-platform way to do this. On windows, try using conio.h. It has the:
textcolor(); // and
textbackground();
functions.
For example:
textcolor(RED);
cprintf("H");
textcolor(BLUE);
cprintf("e");
// and so on.
+ 1
wlcm 💙
0
thanxxx