#include <windows.h>
//设置颜色函数,调用即可改变前景色和背景色
int SetColor(int Forg, int Back)
{
Forg=(Forg&0x0f)+((Back<<4)&0xf0);
HANDLE hOutput=GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hOutput,Forg);
return Forg;
}
//几种常用颜色
int c_black = 0;
int c_yellow = 14;
int c_grey = 7;
int c_green=10;
int c_blue = 9;
int c_red = 12;
int c_white = 15;