Mail Archives: djgpp/1998/03/31/06:45:57
Geoff Schoenbaum, MD, PhD wrote:
> Now I'm
> wondering why when I change the text color attribute with
> textcolor(YELLOW), the next printf statement still prints in standard
> off-white.
A hope you didn't anwer this one yourself already :)
textcolor is a conio.h routine. printf is a stdio.h routine. textcolor
alters the way conio.h functions like cprintf write to the screen (the
CONsole). printf on the other hand writes its output to a file which
happens to be stdin (usually "directed" to the screen) and is not
(controllably) affected by color settings.
Solution: either don't use textcolor in combination with printf, or use
cprintf instead.
Hope this helps...
--
\ Vik /-_-_-_-_-_-_/
\___/ Heyndrickx /
\ /-_-_-_-_-_-_/
- Raw text -