让你的输入输出变得花里胡哨
作者:互联网
Linux下)
void Black()
{
printf("\033[30m");
}
void Red()
{
printf("\033[31m");
}
void Green()
{
printf("\033[32m");
}
void Yellow()
{
printf("\033[33m");
}
void Blue()
{
printf("\033[34m");
}
void Purple()
{
printf("\033[35m");
}
void DeepGreen()
{
printf("\033[36m");
}
void UnderLine(bool use)
{
if (use)
{
printf("\033[38m");
}
else
{
printf("\033[39m");
}
}
void Reset()
{
printf("\033[0m");
}
然后就可以这样试一试:
Red();
printf("This is Red!!!\n");
Black();
printf("This is Black!!!\n");
标签:use,void,输入输出,Black,printf,花里胡哨,033,变得,Red 来源: https://www.cnblogs.com/eafoo/p/16476292.html