Of course, if you're just wanting to change the color as you're typing it, then the above is a bit much. A simpler way would be to use this:
#include <windows.h>
#include <iostream.h>
int main()
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 0); //replace the 0 with a number for the color you want
cout << "Your text here" << endl;
return 0;
}
Last edited by MagikMan74; Sep 26th, 2007 at 2:10 pm. Reason: edit: forgot the [code][/code]