Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ print colorful

//the following are UBUNTU/LINUX, and MacOS ONLY terminal color codes.
#define RESET   "33[0m"
#define BLACK   "33[30m"      /* Black */
#define RED     "33[31m"      /* Red */
#define GREEN   "33[32m"      /* Green */
#define YELLOW  "33[33m"      /* Yellow */
#define BLUE    "33[34m"      /* Blue */
#define MAGENTA "33[35m"      /* Magenta */
#define CYAN    "33[36m"      /* Cyan */
#define WHITE   "33[37m"      /* White */
#define BOLDBLACK   "33[1m33[30m"      /* Bold Black */
#define BOLDRED     "33[1m33[31m"      /* Bold Red */
#define BOLDGREEN   "33[1m33[32m"      /* Bold Green */
#define BOLDYELLOW  "33[1m33[33m"      /* Bold Yellow */
#define BOLDBLUE    "33[1m33[34m"      /* Bold Blue */
#define BOLDMAGENTA "33[1m33[35m"      /* Bold Magenta */
#define BOLDCYAN    "33[1m33[36m"      /* Bold Cyan */
#define BOLDWHITE   "33[1m33[37m"      /* Bold White */
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #print #colorful
ADD COMMENT
Topic
Name
3+1 =