📅  最后修改于: 2022-03-11 14:44:45.736000             🧑  作者: Mango
#include
#include
int main()
{
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
for(int k = 1; k < 255; k++) //higher k = more colour
{
SetConsoleTextAttribute(hConsole, k);
std::cout << k << std::endl;
}
}