Created
November 3, 2011 18:15
-
-
Save fpersson/1337254 to your computer and use it in GitHub Desktop.
difrent color output in C/C++ for unix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define BLACK_TEXT "\e[30;1m" | |
#define RED_TEXT "\e[31;1m" | |
#define GREEN_TEXT "\e[32;1m" | |
#define YELLOW_TEXT "\e[33;1m" | |
#define BLUE_TEXT "\e[34;1m" | |
#define DEFAULT "\e[0m" | |
int main(int argc, char *argv[]) | |
{ | |
printf(GREEN_TEXT); | |
printf("Hallo world\n"); | |
printf(DEFAULT); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment