I am in a intro to C ++ class this semester and our final project is to write the game Master Mind. I have that done and it works but for extra credit we can add color to the game. Our teacher gave us some code to use but I'm not sure what it means:
[HANDLE hConsole;
hConsole = GETStdHandle(STD_OUTPUT_HANDLE);
SETConsoleTextAttribute(hConsole, ORANGE); //declared the colors as constants]
HANDLE is a handle to an object. This type is declared in WinNT.h as follows:
typedef PVOID HANDLE;
GETStdHandle() retrieves a handle to the specified standard device here: STD_OUTPUT_HANDLE The standard output device. Initially, this is the active console screen buffer
SetConsoleTextAttribute Sets the foreground (text) and background color attributes of characters written to the console screen buffer.