How do you set color on inputs and outputs for C++?

I am new to C++ and I want to learn how to set color a particular color for the users input and output. For example, I want to display the users input as green, and their output as red. I tried to search this up, but could not get any clear answer.
I have made a header file for this:

Just look at the example and copy.
5 stars for eklavya sharma 2!
Topic archived. No new replies allowed.