+ 2
How do we make a colourful in python or c++
3 ответов
+ 1
IN C++:
There is no (standard) cross-platform way to do this. On windows, try using conio.h. It has the:
textcolor(); //
and textbackground();
functions
. For example:
textcolor(RED);
cprintf("H");
textcolor(BLUE);
cprintf("e");
// and so on.
in python:
https://stackoverflow.com/questions/287871/print-in-terminal-with-colors
https://stackoverflow.com/questions/37340049/how-do-i-print-colored-output-to-the-terminal-in-python/37340245
+ 4
Try SDL2
- C library that can be use for multiple languages
https://www.sololearn.com/discuss/498964/?ref=app
- 1
This will work for C/C++ in all unix systems:
https://stackoverflow.com/questions/3219393/stdlib-and-colored-output-in-c/3219471