CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2008
    Posts
    17

    Console - How do I color certain text?

    I understand how to change all the text's color with system("color 04"); but how might I change certain lines or individual letters without affecting the other letters?

    Thanks

  2. #2
    Join Date
    Dec 2004
    Location
    Poland
    Posts
    1,165

    Re: Console - How do I color certain text?

    There is no standard C++ way for this. You have to use platform specific functions, like SetConsoleTextAttribute for Windows, or these codes: http://linuxgazette.net/issue65/padala.html if your terminal supports them.

    Cheers
    B+!
    'There is no cat' - A. Einstein

    Use [code] [/code] tags!

    Did YOU share your photo with us at CG Members photo gallery ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured