Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <windows.h>
- using namespace std;
- int main()
- {
- HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);
- SetConsoleTextAttribute(h, 7);
- cout << "Color 7 is the default white\n";
- SetConsoleTextAttribute(h, 8);
- cout << "Color 8 is gray\n";
- SetConsoleTextAttribute(h, 9);
- cout << "Color 9 is blue\n";
- SetConsoleTextAttribute(h, 10);
- cout << "Color 10 is green\n";
- SetConsoleTextAttribute(h, 11);
- cout << "Color 11 is cyan\n";
- SetConsoleTextAttribute(h, 12);
- cout << "Color 12 is red\n";
- SetConsoleTextAttribute(h, 13);
- cout << "Color 13 is purple\n";
- SetConsoleTextAttribute(h, 14);
- cout << "Color 14 is yellow\n";
- SetConsoleTextAttribute(h, 15);
- cout << "Color 15 is bright white\n";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement