Hi there.Does anybody know how to use printf or any other printing function,so that i can print coloured text?
Hi there.Does anybody know how to use printf or any other printing function,so that i can print coloured text?
cprintf() (notice the c)
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.
you can use:
void textcolor (int color);
void textbackground (int color);
They are in Conio, remember, this isn't ANSI.
example:
Code:#include <stdio.h> #include <conio.h> int main(void) { textcolor(5); printf("This is colored\n"); textcolor(2); printf("This is an another colored sentence\n"); getchar(); /* pause */ return 0; }
this topic is alrdy mentioned enough but
the best way to check what function u should use is to check the library reference that comes along with the compiler because
it differs from compiler (BC,GCC,LCC).
I dont know if this question is in the F.A.Q board
But IMO i think this Q has to be in it.....
Originally Posted by Salem