Here is a good topic (specifically the third post) that demonstrates the procedure for a Windows specific program. Windows is a pain in the butt and the API is difficult to use, but this will get the job done. The only downside is the lack of portability to other platforms.
I simplified the code slightly to remove anything that you don't need.
1 2 3 4 5 6 7
int main ()
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hConsole, FOREGROUND_BLUE | FOREGROUND_INTENSITY);
cout << "This text should be blue" << endl;