DEV C++ Compiler Questions re: Color

This is a discussion on DEV C++ Compiler Questions re: Color within the C++ Programming forums, part of the General Programming Boards category; How do you change the text of a cout so that it is a color other than the standard white? ...

  1. #1
    Registered User
    Join Date
    Mar 2005
    Posts
    18

    DEV C++ Compiler Questions re: Color

    How do you change the text of a cout so that it is a color other than the standard white? I would like to have the cout highlight certain data. Thanks!

  2. #2
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    Doesn't look like a less bulky way to do it other than :

    http://msdn.microsoft.com/library/de...tattribute.asp

  3. #3
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,460
    Highly non-portable though. If portability is an issue you may want to consider the PDCurses library.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  4. #4
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    Ahh, never worked with it so I didn't think of it, I just searched for setting the text color and found that link buried in a forum. I assumed it would work for him since Dev C++ is a windows IDE. I should check out PDCurses some day heh.

  5. #5
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,460
    I do like it. Had a few problems in the beginning. There seemed to be no documentation for it other than the provided example programs, untill I realized it's based on NCurses. So any NCurses documentation will suffice for the most part. This is probably the best choice for graphic consoles that we want portable.

    Another, more sophisticated, library is TVision. It's based on the old borland library. It was what created those cool looking interfaces ("cool", back then) on most DOS applications. There's ports for most systems, but I'm not sure how well implemented they are.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  6. #6
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,262
    Or you could have searched the forums .... I think that works in dev anyway.

  7. #7
    Registered User
    Join Date
    Nov 2005
    Posts
    545
    Adrian XW all the way!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem building Quake source
    By Silvercord in forum Game Programming
    Replies: 16
    Last Post: 07-11-2010, 09:13 AM
  2. Compiler questions
    By DvdHeijden in forum C++ Programming
    Replies: 6
    Last Post: 01-17-2005, 02:00 PM
  3. Replies: 5
    Last Post: 02-08-2003, 06:42 PM
  4. [WinAPI] Developing a color customizable program
    By Templario in forum Windows Programming
    Replies: 6
    Last Post: 02-04-2003, 05:12 PM
  5. About Color in MFC
    By Alextrons in forum Windows Programming
    Replies: 0
    Last Post: 11-05-2001, 06:40 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21