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++.
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
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
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
>>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.
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
Didnt' you mean to say, "It was I who indeed spelt it incorrectly"?
It was me that spelt it correctly
What do you mean? Isn't the background black with white text by default?
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.
Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah
You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie
>> 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.
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]