Probably the most asked question in windows converted to linux:
How can you have collored text in a linux console program.
:)
And if anyone knows, in gVIM, how do you get it to keep you color scheme?
Printable View
Probably the most asked question in windows converted to linux:
How can you have collored text in a linux console program.
:)
And if anyone knows, in gVIM, how do you get it to keep you color scheme?
This search would probably be more effective than just 'color'
http://www.cprogramming.com/cboard/s...der=descending
This is how I do it
I believe that there are various alternativesCode:char green[11]="\033[1;32m";
char blue[11]="\033[1;34m";
printf("%sThis is how you use colors\n", blue);
printf("%s-------------------\n", green);
why [11] and not [8]?Quote:
Originally posted by unixOZ
This is how I do it
I believe that there are various alternativesCode:char green[11]="\033[1;32m";
char blue[11]="\033[1;34m";
printf("%sThis is how you use colors\n", blue);
printf("%s-------------------\n", green);
>>why [11] and not [8]?
Why not [] ?
char green[]="\033[1;32m";
char green[]="\033[1;32m"; is better
here is a good explanation:
http://www.linuxgazette.com/issue65/padala.html
-Luke
PS:
next time try:
http://www.google.com/linux