Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

Colors/styles For Text?


3 replies to this topic

#1 ewcreators

    Member [Level 1]

  • Kontributors
  • PipPipPipPip
  • 59 posts

Posted 07 December 2007 - 01:01 PM

How do i change colors or styles of text in c++?
like for colors eg. :
hello world
for styles:
Hello World

#2 CrashCore

    Super Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 225 posts

Posted 14 April 2008 - 04:44 AM

View Postewcreators, 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

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!

#3 ivenms

    Member [Level 1]

  • Kontributors
  • PipPipPipPip
  • 52 posts

Posted 03 May 2008 - 04:58 PM

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.

#4 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 11 March 2010 - 05:42 AM

how do i change size & color of textColors/styles For Text?

Please tell me how I can change the colour & size of text  and the colour of backround

in C Language.

-question by Yogesh Garg




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users