Mail Archives: djgpp/2001/06/20/17:15:19
Steve B <knurd62 AT hotmail DOT com> wrote:
> Hi,
> Im programming a text adventure game using DJGPP
> and im wondering how to use colours (with <iostream>
> and cout) in c++.
In a nutshell: you don't. Not with <iostream> stuff, that is.
> Ive heard something about using ANSI escape sequences but im not
> sure how to use these for colours.
You can do that, right. But that'd mean you'ld have to assume that all
users of the program will have the ANSI.SYS driver loaded --- on some
platforms or for some users, that may be impossible.
You'll probably have to move from <iostream> to a <strstream> or
<sstream>, and use functions from <conio.h> to do the actual output to
screen, later.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -