I am writing a program in C. I want to change the text color and background color in the console. My sample program is -
#include
#include &
You can also use rlutil:
rlutil.h
),setColor()
, cls()
, getch()
, gotoxy()
, etc.Your code would become something like this:
#include
#include "rlutil.h"
int main(int argc, char* argv[])
{
setColor(BLUE);
printf("\n \n \t This is dummy program for text color ");
getch();
return 0;
}
Have a look at example.c and test.cpp for C and C++ examples.