coloured output

Q-I want coloured output in my C program while working on vi editor ......

I use textcolor() function and cprintf() function but its not working....?

how to do it...?
The Short Answer: http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/color.html
The Long Answer:
Install ncurses: (apt-get install ncurses-dev or yum install ncurses-dev or whatever floats your boat)
Experiment: be sure to compile with
-lncurses 
flag
Example
$ g++ main.cpp -o nice_example -Wall -Werror -lnurses

Learn ncurses
> Learn the basics
> Learn about windows
> Use my link
-- OR --
Use escape codes: http://stackoverflow.com/questions/2616906/how-do-i-output-coloured-text-to-a-linux-terminal
Topic archived. No new replies allowed.