I need to implement a program in C that has to print a string in the console but with other color than the default.
what is the instruction i have to use? I already tried this:
printf("%c[%d;%dmHello World%c[%dm\n",27,1,33,27,0);
but without success.
I'm using xCode in mac os x.
Another question is:
Is there a function that can clear the console? I want to printf a string, delete it and then printf another string in the same place. It is possible?
Thanks in advance
what is the instruction i have to use? I already tried this:
printf("%c[%d;%dmHello World%c[%dm\n",27,1,33,27,0);
but without success.
I'm using xCode in mac os x.
Another question is:
Is there a function that can clear the console? I want to printf a string, delete it and then printf another string in the same place. It is possible?
Thanks in advance