+ 1

How can we change color in every word in C++??

2nd May 2021, 9:30 PM
Rao Mudasir
Rao Mudasir - avatar
2 ответов
+ 2
Changing the color of the words is more dependent on the platform and the machine. But luckily there are libraries that can help you. I will only mention two: ncurses PDcurses. ncurses en wikipedia: https://es.m.wikipedia.org/wiki/Ncurses ncurses: https://programacionsistemas.wordpress.com/2011/08/25/anexo-1-3-2-la-libreria-ncurses-colores-y-mas-en-la-consola-de-gnulinux/ ncurses how to use and link it: http://www.lcc.uma.es/~alvarezp/bibliotecas/ncurses.html ncurses en invisible-island: https://invisible-island.net/ncurses/announce.html Ncurses and PDcurses are part of the POXI standard so it gives us an advantage. But to use it you must download it. But if you don't want to use ncurses you should investigate the ANSI escape codes of your console to know how to change the color of the text.
2nd May 2021, 9:58 PM
Daniel Briceño
Daniel Briceño - avatar
+ 1
You can either make use of ANSI escape sequences or a graphic library ( as suggested by Daniel Briceño ) for the same.
3rd May 2021, 3:15 AM
Arsenic
Arsenic - avatar