- 2
How to change text color in c++ ?
2 RĂ©ponses
+ 5
Colors are bit-encoded. If You want to change the Text color in C++ language There are many ways. In the console, you can change the properties of output.
The second way is calling the system colors.
#include <iostream>
#include <stdlib.h>
using namespace std;
int main() { //Changing Font Colors of the System system("Color 7C");
cout << "\t\t\t ****Ang****\t\t\t " << endl;
cout << "\t\t\t *** MENU ***\t\t\t " <<endl;
return 0; }
0
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
//changing the color
//Code by Ajeet
system("Color 7C");
cout << "\t hello color changer " << endl;
cout << " hello color" <<endl;
return 0;
}