how would you add color to text in c++
Do you mean the program source code or on the screen?
@christianGeek i mean on the screen
What operating system? What graphics framework?
@ChristianGeek At school I use a windows computer and at home I use a Mac
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?"
Join our real-time social learning platform and learn together with your friends!