+ 1

How to colour text in c++

How can I output coloured text in c++ using cout or anything else if available

29th Feb 2020, 12:01 PM
Suryaansh singh
Suryaansh singh - avatar
3 Respostas
+ 4
#include <conio.h> void main() { clrscr(); textcolor(RED); textcolor(LIGHTBLUE); cprintf("Hello\n"); getch(); } U can also graphics headder file for text print use outtextxy(,,"hello") Pass 2 value for coordinate
2nd Mar 2020, 7:07 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 1
Thanks brother could you explain with an example
29th Feb 2020, 12:37 PM
Suryaansh singh
Suryaansh singh - avatar
0
Thankyou bro this is the perfect answer I wanted. Now i am getting colored text however sololearn dont have conio.h so I am using other cpp Ide. Btw thanks a lot
2nd Mar 2020, 8:08 AM
Suryaansh singh
Suryaansh singh - avatar