Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Colors/styles For Text?, How do we change colors?
ewcreators
post Dec 7 2007, 01:01 PM
Post #1


Member [Level 1]
****

Group: Members
Posts: 59
Joined: 28-August 07
Member No.: 48,983



How do i change colors or styles of text in c++?
like for colors eg. :
hello world
for styles:
Hello World
Go to the top of the page
 
+Quote Post
CrashCore
post Apr 14 2008, 04:44 AM
Post #2


Super Member
*********

Group: [HOSTED]
Posts: 225
Joined: 8-April 05
Member No.: 5,385



QUOTE(ewcreators @ Dec 7 2007, 08:01 AM) *
How do i change colors or styles of text in c++?
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/forum/thread131982.html

If you would like a Visual C tutorial for this, I believe that this will work:

http://www.daniweb.com/forums/thread9921.html

Hope this helps!
Go to the top of the page
 
+Quote Post
ivenms
post May 3 2008, 04:58 PM
Post #3


Member [Level 1]
****

Group: Members
Posts: 53
Joined: 6-August 06
Member No.: 27,912



For normal C, use header file GRAPHICS.H for advanced graphics support for your programs in C.

There are many built in functions to set the style of text and other output objets.

Read the document of GRAPHICS.H for its every functions and its uses.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Centering The Text In A Simple C++ Program?(8)


 



- Lo-Fi Version Time is now: 27th July 2008 - 01:36 AM