How do i change colors or styles of text in c++?
like for colors eg. :
hello world
for styles:
Hello World
| |
|
Welcome to KnowledgeSutra - Dear Guest | |
Colors/styles For Text?
Started by ewcreators, Dec 07 2007 01:01 PM
3 replies to this topic
#2
Posted 14 April 2008 - 04:44 AM
ewcreators, on Dec 7 2007, 08:01 AM, said:
How do i change colors or styles of text in c++?
like for colors eg. :
hello world
for styles:
Hello World
like for colors eg. :
hello world
for styles:
Hello World
Such a thing is not really possible. Really, things like style and color are part of the output, and if you are using something like cout (in iostream) it is only sending a string to Standard Out.
Even with something such as printf (this is, of course, a Java function, but there is something similar in C++), the output text is simply formatted into a different string. Attributes such as color and style are a part of the OS or the environment that you are running in. If you are writing this code in Visual C or something, it may be possible. This topic is covered a little here:
http://bytes.com/for...read131982.html
If you would like a Visual C tutorial for this, I believe that this will work:
http://www.daniweb.c...thread9921.html
Hope this helps!
Reply to this topic

1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users














