is there a way to display colored text in the screen
and how to do it
thank you,
is there a way to display colored text in the screen
and how to do it
thank you,
Last edited by thepolo; 05-24-2009 at 03:54 PM.
Yes, in most systems it is possible.
Unfortunately, there is no generic way to do this with Standard C. Various OS's and compilers have their solutions, and there are some generic libraries, such as ncurses or pdcurses that may do something like this - but that's a bit like buying a 211 piece toolkit, because you need a PZ1 screwdriver.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Aw, it's not so hard in Windows anyway. Here's how to do it (go back and read the full tutorial too, it's good):
Win32 Console Applications 4
I didn't say it was hard. But since the original post doesn't even say if it's Windows, Linux, Solaris, VAX/VMS, a small company proprietary OS. So explaining how to do it in ONE OS, when there are possibly hundreds of others that it possibly could be (ok, so it's UNLIKELY that it is something other than Windows or Linux, but...)
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
If it's a Unix/Linux based platform then all you do is enable vt100 or compatible mode terminal emulation and pick the desired ANSI escape sequence, as in
Code:printf("\033[37;41m"); /* change screen to foreground white and background red */
I really appreciate all your help
the os that i use is Ubuntu
i think this article is quite useful
So You Like Color
thank you for all your done