Connecting Tech Pros Worldwide Help | Site Map

How change text colour?

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 22nd, 2005, 11:16 AM
kiko
Guest
 
Posts: n/a
Default How change text colour?

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, 11:16 AM
Victor Bazarov
Guest
 
Posts: n/a
Default 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, 11:17 AM
marbac
Guest
 
Posts: n/a
Default 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, 11:33 AM
Prateek R Karandikar
Guest
 
Posts: n/a
Default 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
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.