How many different ways are there to change the text and background colors of your output? It varies based on the compiler you're using, right? I'm using Microsoft's Visual C++.
Printable View
How many different ways are there to change the text and background colors of your output? It varies based on the compiler you're using, right? I'm using Microsoft's Visual C++.
whatever RGB you can come up with is the limit.
How about a felt-tip pen? All the colours of the rainbow, and more... :)
I'm sure there's a better reference in MSDN somewhere, but here's one for now:
http://msdn.microsoft.com/library/de...tive_cells.asp
Is there any real purpose to changing the text and background colour...I mean color (hehe, I'm making fun of hammer)?
It seems that feature is only used for fun. Do serious programmers really use it?
>>hehe, I'm making fun of hammer
What you talkin 'bout? It was me that spelt it correctly :D
>>Do serious programmers really use it?
Sure, if you don't set the background colour yourself, who knows what colour it will be. If you've changed the foreground only, your text may become invisible. :eek:
Didnt' you mean to say, "It was I who indeed spelt it incorrectly"? :DQuote:
It was me that spelt it correctly :D
What do you mean? Isn't the background black with white text by default?Quote:
Sure, if you don't set the background colour yourself, who knows what colour it will be.
When I first started programming, I didn't remember my book saying anything about setting the proper colors to make sure my "hello world" program had a black background with white text.
A user has the ability to customize the colours that are used in the Windows console. Thus, you never do know what the colours will be, unless you set them yourself.
>> Isn't the background black with white text by default
Yes, maybe, but the user can change their console window default at the click of a button. Besides, I took this as a more general question, meaning anykind of console style programming (eg *nix curses included).
[edit]
Doh, I spent so long thinking of a witty reply, I got beat to the answer. :rolleyes: