text: #include <iostream>
  #include <windows.h>
  using namespace std;
  
  //returns the current attributes
  WORD GetConsoleTextAttribute(HANDLE hCon)
  {
  	CONSOLE_SCREEN_BUFFER_INFO con_info;
  	GetConsoleScreenBufferInfo(hCon, &con_info);
  	return con_info.wAttributes;
  }
  
  int main(void)
  {
  	HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
  	const int saved_colors = GetConsoleTextAttribute(hConsole);
  
  	SetConsoleTextAttribute(hConsole, FOREGROUND_BLUE | FOREGROUND_INTENSITY);
  	cout << "This text should be blue" << endl;
  	SetConsoleTextAttribute(hConsole, saved_colors);
  	getchar();
  }