how to give a color to the text that displayed in output screen

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • harish12345
    New Member
    • Jan 2013
    • 1

    how to give a color to the text that displayed in output screen

    i am using c++v30.5 version i want red color text in in my output screen . i viewed various site but the result is 0 ,

    wat to do and as well give me a sample program for that
  • Anas Mosaad
    New Member
    • Jan 2013
    • 185

    #2
    We shouldn't give you complete solution, we give you some guidance to help you build your skills. Use textcolor from conio.h

    Comment

    • swapnali143
      New Member
      • Mar 2012
      • 34

      #3
      You Can try this...........
      textattr sets text attributes for text-window functions
      textbackground selects a new text background color
      textcolor selects a new character color in text mode


      Declaration:
      void textattr(int newattr);
      void textbackground( int newcolor);
      void textcolor(int newcolor);

      These functions work for functions that produce text-mode output directly to the screen (console output functions).

      textattr sets both the foreground and background colors in a single call.

      textbackground selects the background color.

      textcolor selects the foreground character color.

      Comment

      Working...