Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <windows.h>
- using namespace std;
- void color (unsigned short v) {
- HANDLE hcon = GetStdHandle(STD_OUTPUT_HANDLE);
- SetConsoleTextAttribute(hcon, v);
- }
- int main() {
- color (0xF0);
- cout << "Hello ";
- color (0xFC);
- cout << "World";
- color (0xF0);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement