c语言color函数用法 c语言怎么通过setcolor改变字体颜色?
c语言怎么通过setcolor改变字体颜色?#include#include使用命名空间stdvoid SetColor(unsigned short ForeColor,unsigned short
c语言怎么通过setcolor改变字体颜色?
#include
#include
使用命名空间std
void SetColor(unsigned short ForeColor,unsigned short BackGroundColor)
{HANDLE hCon=GetStdHandle(stdŠOUTPUTŠHANDLE)
SetConsoleTextAttribute(hCon,(ForeColor )|(BackGroundColor *16))}
int main()
{
inti、 j
while(cin>>i>>j)
{
SetColor(i,j)
cout
SetColor(7,0)///恢22797;恑底白字..}