-
#include <me!>
Color in C++
I want to add some basic colors into my C++ console program, just to give it some artistic value... or something like that.
What is the best way to go about this?
-
Registered User
Depends. On windows, you might check out ::SetConsoleTextAttribute(..), detailed on MSDN and in this FAQ entry: http://www.sunlightd.com/Windows/FAQ...leChangeColour and on linux, I think the curses library provides some color functions. Some odd escape sequences I guess can be print'ed, as detailed in this article: http://www.developer.com/open/article.php/631241 for linux.
-
if your wanting to run in a normal CMD window, use the system("color xx") function.
to see the list of colors, open command prompt and type color ?/
-
Registered User
To continue the assumption that this is for windows - since the op hasn't specified:
http://www.adrianxw.dk/SoftwareSite/...Consoles1.html
gg
Popular pages
Recent additions