cmd color text c 2b 2b

Solutions on MaxInterview for cmd color text c 2b 2b by the best coders in the world

showing results for - "cmd color text c 2b 2b"
Eleana
21 Jul 2019
1#include <iostream>
2#include <windows.h> 
3int main()
4{
5    HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
6    for(int k = 1; k < 255; k++) //higher k = more colour
7    {
8        SetConsoleTextAttribute(hConsole, k);
9        std::cout << k << std::endl;
10    }
11}