Is there a way to print colored output using iostream and Xcode? I’d like to be able to, for example, print Hello World! with Hello red, World blue and ! yellow. How can I do that?
Is there a way to print colored output using iostream and Xcode? I’d like
Share
You need the terminal color codes. For linux it’s the following (your system might be different, look it up):
This allows you to do the following:
Note: If you don’t use RESET the color will remain changed until the next time you use a color code.