Timeline for Colorful output on terminal
Current License: CC BY-SA 3.0
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 23, 2016 at 15:02 | comment | added | Abhinav Gauniyal | I tried to study more about it today and got to know that cout/cin can be redirected to files too. tbh I wasn't even aware of it. How do you recommend to tackle that problem? Is this what I should be doing - stackoverflow.com/questions/18081392/… | |
| Feb 23, 2016 at 2:49 | comment | added | Jerry Coffin |
@AbhinavGauniyal: As one obvious example, you might have cout directed to a file, but want to highlight an error message (being written to std::cerr and still going to the console) in red.
|
|
| Feb 23, 2016 at 2:47 | comment | added | Abhinav Gauniyal |
Thankyou, I was definitely considering template as well and I'll correctly write that bool expression too. However I am not able to understand 1st point you've mentioned. This means the rest of the functions only work correctly if you pass std::cout as the stream to which they're going to write., well I'm targetting cout only and what else should I , and this won't write to a file with cout because of isatty. Could you explain a bit?
|
|
| Feb 22, 2016 at 21:32 | history | answered | Jerry Coffin | CC BY-SA 3.0 |