plz tell me in detail bcoz i dunno anything abt it.How to change font color,underline text,background color in c++?
use this:
FOR THE COLOR
in windows:
start %26gt; run %26gt; cmd
color /?
then put number of color that you want,
first number is backg color, last is fore color;
for example color 1e is bg blue with font color bright white
in c++ :
system(';color 1e';);
FOR THE WINDOW
system(';mode con lines=10';);//for example vertically size is 10 lines
system(';mode con cols=50';);//for example vertically size is 50 charactersHow to change font color,underline text,background color in c++?
to change the text color in C++ u can write this in the int main(void) part:
int main()
{
system(';color 3';);
}
1,2,3... being the color type.
Report Abuse
well, i just found out recently about changing color, but paste this in:
SetConsoleTextAttribute
(GetStdHandle (STD_OUTPUT_HANDLE), 14);
dont indent like that, its just that when i posted it it was cut off
for me, simply putting that in changed all the subsequent text to yellow, and where it says 14 at the end, replace it with numbers like these:
8: gray
9: dark blue
10: bright green
11: bright blue
12: bright red
14: bright yellow
15: white
idk about fonts, but this may help :)
No comments:
Post a Comment