Connecting Tech Pros Worldwide Help | Site Map

How change text colour?

  #1  
Old July 22nd, 2005, 12:16 PM
kiko
Guest
 
Posts: n/a
How can I change the output text colour?
Here is part of example source code:
....
textcolor(4);
cout << "text";
....

The "cout" doesn't work with "textcolor".
I don't want to use "cprintf".
Thanx.


  #2  
Old July 22nd, 2005, 12:16 PM
Victor Bazarov
Guest
 
Posts: n/a

re: How change text colour?


kiko wrote:[color=blue]
> How can I change the output text colour?[/color]

There is no way in standard C++. Screen attributes (text colour included)
are not controlled by any language construct but by OS-specific means.
Please post your question to a newsgroup that deals with your OS.

V
  #3  
Old July 22nd, 2005, 12:17 PM
marbac
Guest
 
Posts: n/a

re: How change text colour?


kiko schrieb:[color=blue]
> How can I change the output text colour?
> Here is part of example source code:
> ...
> textcolor(4);
> cout << "text";
> ...
>
> The "cout" doesn't work with "textcolor".
> I don't want to use "cprintf".
> Thanx.
>
>[/color]

Not standard c++ :

http://en.tldp.org/HOWTO/NCURSES-Pro...WTO/intro.html

Don`t know if available for windows.
  #4  
Old July 22nd, 2005, 12:33 PM
Prateek R Karandikar
Guest
 
Posts: n/a

re: How change text colour?


> How can I change the output text colour?[color=blue]
> Here is part of example source code:
> ...
> textcolor(4);
> cout << "text";
> ...
>
> The "cout" doesn't work with "textcolor".
> I don't want to use "cprintf".
> Thanx.[/color]

There exists no such thing as "colour" in Standard C++.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
To iterate is human, to recurse divine.
-L. Peter Deutsch
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change Text Colour? maheshgupta0248 answers 1 December 10th, 2008 10:29 AM
Change text colour in one function helraizer1 answers 4 October 8th, 2007 01:39 PM
Can I change the title property's (hint on mouseover) text colour etc Robert T answers 1 August 22nd, 2006 12:35 PM
Change text colour in table Dwight answers 4 November 13th, 2005 04:42 AM