+ 1
Change the color of the text in c++
I know i can change color but how i can change without change others?? Like this: hi(in red) hi(in blue)
8 odpowiedzi
+ 1
Use graphics headerfile
#include<graphics.h>
And set graphics path
And for text print
Use
outtextxy(pass two parameter nd seprate with comma, " text");
For color use
Setcolor (color name );
+ 2
Yes u can but not in sololearn compiler
Try to use code blocks on pc
Or cxxdroid apk
And then use graphic lib like this
+ 2
#include <conio.h>
void main()
{
clrscr();
textcolor(RED);
cprintf ("Welcome to Tutorial of Graphics in C/C++\n");
textcolor(LIGHTBLUE);
cprintf("Hello\n");
getch();
}
+ 2
Abhay the code doesnt works in windows
+ 1
Abhay ok I am on it sololearn IDE is not as good as Codeblocks and the rest.