coloured text in console

G

Ghai

i need help in displaying coloured text in console.
got any other way exept accessing text area in oxB8000
please help.
 
V

Victor Bazarov

Ghai said:
i need help in displaying coloured text in console.

Then you need to post to the newsgroup dedicated to your OS. C++ has
no built-in means defined to do what you want.

V
 
R

Rolf Magnus

Ghai said:
i need help in displaying coloured text in console.

Standard C++ doesn't even have a "console". So you need some non-standard
library that does it for you. One such library that is available for many
systems is called 'ncurses'.
 
A

asterisc

There is also: CONIO (console input output), known for Borland3.1
(16bit DOS c/c++ programming)
 
A

Alf P. Steinbach

* Ghai:
i need help in displaying coloured text in console.
got any other way exept accessing text area in oxB8000
please help.

Be aware that the C++ standard library offers only basic i/o facilities
such as pure text streams. So your question is technically off-topic
here. But you couldn't know that before asking... ;-)

One answer is given by the FAQ "How can I change the colors on the
screen", currently at <url:
http://www.parashift.com/c++-faq-lite/input-output.html#faq-15.21>.

However, while following that advice will teach you things you really
need to know, in the long run, it doesn't help you directly here & now.

You forgot to mention your system, but it's obviously (for those
familiar with it) Microsoft Windows.

Both *nix and Windows have standard libraries that do colored text i/o.
In *nix I believe ncurses can do this feat (at least it allows you to
move the cursor around, clear the screen, and so on), and in Windows you
can use the Windows console API functions. In both cases it amounts to
using a library, and if you need help with that, please ask in an
appropriate system-specific group (see this group's FAQ for guidelines).

If you're lucky your compiler may provide some simpler interface to the
relevant library.

In that case it may be enough simply to include the relevant header
shipped with your compiler: for that you need to check your compiler's
documentation, as the FAQ item mentioned above advices.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top