How change text colour?

K

kiko

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

Victor Bazarov

kiko said:
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
 
P

Prateek R Karandikar

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
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 

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,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top