netrookie
全部博文(158)
2010年(71)
2009年(87)
bluefire
Bsolar
yang5059
Judy_070
mengyun8
wg198812
prolee
taiyangs
StarWing
分类: WINDOWS
2009-10-14 22:08:27
#include <windows.h>#include <iostream>using namespace std;void SetColor(unsigned short ForeColor = 3, unsigned short BackGroundColor = 0) {HANDLE hCon = GetStdHandle(STD_OUTPUT_HANDLE);SetConsoleTextAttribute(hCon, ForeColor | BackGroundColor);}int main() {SetColor();cout << "Hello World" << endl;SetColor(40, 30);cout << "Hello World" << endl;cout << "Hello World" << endl;return 0;}
上一篇:WORD DWORD LPVOID UINT区别
下一篇:GetFileSize学习
登录 注册