473,395 Members | 1,742 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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.
Jul 22 '05 #1
3 8653
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
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
> 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Louise | last post by:
Hi I have written an HTML pages which does not have any colour specifying tags as far I know. When I view this in an Microsoft internet explorer browser it appears with a white background and...
18
by: Jan Tuxen | last post by:
Jakob Nielsen in his most recent Alertbox (http://www.useit.com/alertbox/20040503.html) tells web authors to change the color of visited links. I agree to his purpose: Help users understand...
3
by: Peter Williams | last post by:
Hi All, I want to write some javascript for a html page which does the following. Imagine that the page contains a table with 2 columns and 3 rows, e.g.: +---+---+ | A | B | +---+---+
1
by: amber | last post by:
Hi there, I'd like to change the colour of my tabs. I can change my background colour of my tab control, but the actual tabs, with the text on them don't change colour. Am I missing something?...
4
by: Dwight | last post by:
I need to change the colour of text values within a table. For example "Software" being red, "Lab Software" blue etc. To change colour of number values simply, 1, entered into the format section...
3
by: Fuzzyman | last post by:
Hello all, I'm using a website creation tool (called `rest2web <http://www.voidspace.org.uk/python/rest2web/>`_) that lets me store my content in a text based format ( `ReStructuredText...
4
by: gurdz | last post by:
Does anyone know how to change the colour of the text in the console in C??
1
by: Robert T | last post by:
Hi I would like to change the title property(the hint displayed when you move over it) of an elements colour/and or text size. Is this possible Can I change the title property's (hint on...
4
by: html | last post by:
Hello all, I need to change the colour of my text. For the paragraph I do document.fgColor ="blue" ; but how do I do this for the select tags? ....and I prefer it to apply to all select tags...
4
by: sgxbytes | last post by:
Hi, My html has <Table style="year-button-archive" width="60%" > <tr> <td class="gold" > <a title="year">By Year:</a> <td class="gold"> <a id = "2008"...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.