Lately I've been experimenting with coding basic programs in C using Xcode, and I've found myself looking for ways to italicize text or make it bold or coloured. Despite the numerous similar posts on SO, there hasn't been one to prove helpful to my situation, however I've found many examples for this in C++ (if that means anything). Perhaps it's not possible to format text in C using Xcode?
Particularly, I've read about using ANSI escape coding, but when I use this code:
The default internal console for XCode is not a terminal, so it doesn't interpret escape codes. As a result you don't get to see the effects of bold/color changes.
On XCode 8, there is an option to edit the scheme to get the program to run in a terminal. Click on the pop-down to the right of the stop button, and select 'Edit Scheme…'
Once you pop up the 'edit scheme' screen, choose
options, then select run in terminal.
If you're just trying to get it to run from a terminal; you can launch terminal separately, then drag and drop the binary from the 'Products' section of the project navigator into the terminal (it will print out the full path to the binary in the terminal, and you can run it from there).
Colored emojis do display properly on the console; it's just that it doesn't respect color escape codes.