is there a way to change the text colors in the console
Printable View
is there a way to change the text colors in the console
For a windows machine.......look up the SetConsoleTextAttribute() API function on MSDN....
textcolor(RED); // For Red
textcolor(GREEN); // For Green
what do I need to include?
It depends on what your compiler is, I'm not sure about the others, but in dev-cpp it is <conio.c>
Just as Fordy stated...simply include windows.h and use this:
Experiment :D also FOREGROUND_BLUE, FOREGROUND_GREEN.Code:SetConsoleTextAttribute( GetStdHandle(
STD_OUTPUT_HANDLE ),
FOREGROUND_RED );