Possible Duplicate:
Colorize stdout output to Windows cmd.exe from console C++ app
I am using codeblocks on Windows XP and I need a way to output colored text, and maybe change the color of the background as well in a console application.
I tried the conio.h functions but they don’t seem to be compatible with code blocks.
It looks like you’ll want to use some Windows API features to accomplish this.
If you were using Cygwin for windows, it’d be a bit easier.
Here’s an example courtesy of daniweb: