By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,797 Members | 1,836 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,797 IT Pros & Developers. It's quick & easy.

How change text colour?

P: 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.
Jul 22 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
kiko wrote:
How can I change the output text colour?


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
Jul 22 '05 #2

P: n/a
kiko schrieb:
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.


Not standard c++ :

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

Don`t know if available for windows.
Jul 22 '05 #3

P: 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.


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

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
To iterate is human, to recurse divine.
-L. Peter Deutsch
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Jul 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.