I am using Dev-C++ to compile my source. I want to change my text color in dos text mode but I cannot use textcolor( ) with conio.h to do it because only Borland compilers can use that function. Is there another way to change my text color? Thanks.
I am using Dev-C++ to compile my source. I want to change my text color in dos text mode but I cannot use textcolor( ) with conio.h to do it because only Borland compilers can use that function. Is there another way to change my text color? Thanks.
Do a search, this has been covered many times.
Here's a line from an old DOS .BAT file that changes the text color. You would have to use system(PROMPT...)
PROMPT $e[1;32;44m$p$g:$e[33m
This works in a DOS window. I assume it will work in a Windows console program.
You'll have to do some research and/or hacking to get the colors you want
[EDIT]
BTW - In case you're not aware, text color is not part of the ANSI C++ standard. If and how you can do it depends on your platform and compiler.
Last edited by DougDbug; 06-20-2003 at 12:41 PM.
Ahh, I was thinking about ANSI.SYS but didn't see it in my AUTOEXEC.BAT... I forgot that it was in CONFIG.SYS.
Thanks for your help, appreciate it.