Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > coloured text in console

Reply
Thread Tools

coloured text in console

 
 
Ghai
Guest
Posts: n/a
 
      04-19-2006
i need help in displaying coloured text in console.
got any other way exept accessing text area in oxB8000
please help.

 
Reply With Quote
 
 
 
 
Victor Bazarov
Guest
Posts: n/a
 
      04-19-2006
Ghai wrote:
> 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
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask


 
Reply With Quote
 
 
 
 
Rolf Magnus
Guest
Posts: n/a
 
      04-19-2006
Ghai wrote:

> 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'.

 
Reply With Quote
 
asterisc
Guest
Posts: n/a
 
      04-19-2006
There is also: CONIO (console input output), known for Borland3.1
(16bit DOS c/c++ programming)

 
Reply With Quote
 
Alf P. Steinbach
Guest
Posts: n/a
 
      04-19-2006
* 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.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cross-platform coloured text in terminal Jonathan Hartley Python 4 04-20-2010 12:12 AM
Cross-platform: Coloured text, Networking, Multithreading Tomás Ó hÉilidhe C Programming 34 11-14-2008 09:41 PM
Blue coloured text beneath folders. g saul Computer Support 10 10-02-2005 02:26 PM
coloured text... sudip C Programming 4 07-07-2005 01:41 AM
Differently Coloured Text in one textual area arun.hallan@gmail.com Java 2 02-11-2005 10:33 AM



Advertisments