In C++ programming, the default background of the output screen is black and the text color is the white color, the task is to color both the background and text color in the output screen.
The header file required to color the text and background can be either of the given header files:
Syntax of the color console:
// Color of the console
console_color = GetStdHandle(STD_OUTPUT_HANDLE);
// P is color code according to your need.
Below is the program for the same: