C++ :: 콘솔 글자 및 배경색 변경하기
#include #include using namespace std; enum Color { BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, LIGHTGRAY, DARKGRAY, LIGHTBLUE, LIGHTGREEN, LIGHTCYAN, LIGHTRED, LIGHTMAGENTA, YELLOW, WHITE }; void textcolor(int foreground, int background) { int color = foreground + background * 16; SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), color); } int main() { textcolor(LIGHTBLUE, BLACK); cout