Ask your own question, for FREE!
Computer Science 18 Online
OpenStudy (anonymous):

how would you add color to text in c++

OpenStudy (anonymous):

Do you mean the program source code or on the screen?

OpenStudy (anonymous):

@christianGeek i mean on the screen

OpenStudy (anonymous):

What operating system? What graphics framework?

OpenStudy (anonymous):

@ChristianGeek At school I use a windows computer and at home I use a Mac

OpenStudy (anonymous):

The problem is that the answer to your question is dependent on a number of different factors. In general, if you're programming to a modern graphics framework then you most likely have a font object and that object has several attributes you can set including color, size, style, etc. More traditional coding requires you to make a system call to set the color before drawing the text. Even with a modern graphics framework, the calls are different on Windows than they are on the Mac. I would suggest you close the question and open a new one that asks more specifically. For example, if I was asking the question for the coding environment I work in, the question would be something like: "If I'm coding on Windows in C# with .NET 4, how do I put text on the screen and change its color?"

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!