daily pastebin goal
62%
SHARE
TWEET

c++

a guest Mar 20th, 2019 100 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <windows.h>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.    HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);
  8.  
  9.    SetConsoleTextAttribute(h, 7);
  10.    cout << "Color 7 is the default white\n";
  11.    SetConsoleTextAttribute(h, 8);
  12.    cout << "Color 8 is gray\n";
  13.    SetConsoleTextAttribute(h, 9);
  14.    cout << "Color 9 is blue\n";
  15.    SetConsoleTextAttribute(h, 10);
  16.    cout << "Color 10 is green\n";
  17.    SetConsoleTextAttribute(h, 11);
  18.    cout << "Color 11 is cyan\n";
  19.    SetConsoleTextAttribute(h, 12);
  20.    cout << "Color 12 is red\n";
  21.    SetConsoleTextAttribute(h, 13);
  22.    cout << "Color 13 is purple\n";
  23.    SetConsoleTextAttribute(h, 14);
  24.    cout << "Color 14 is yellow\n";
  25.    SetConsoleTextAttribute(h, 15);
  26.    cout << "Color 15 is bright white\n";
  27.    return 0;
  28. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top