system("COLOR Value");
Note:In this tutorial we will focus on system("COLOR Value");function,but there are some other functions that I will not comment them becase We have tutorials related to uncommented functions.
The system("COLOR Value"); changes the default font and foreground color of the console application.
#include <iostream>
using namespace std;
int main()
{
system("COLOR 4");
cout<<"Hello World"<<endl;
system("PAUSE");
return 0;
}
system("color 4"); will change the font color to red.
Table of Colors
0 = Black | 8 = Gray |
1 = Blue | 9 = Light Blue |
2 = Green | A = Light Green |
3 = Aqua | B = Light Aqua |
4 = Red | C = Light Red |
5 = Purple | D = Light Purple |
6 = Yellow | E = Light Yellow |
7 = White | F = Bright White |
No comments:
Post a Comment