![]() |
|
#1
|
||||
|
||||
Printing colorful characters to the consoleHey guys,
How do I print colorful string to the console ? Would like to implement a cprintf function (for my OS project) that will print its arguments to the console with the desired colors. Example usage will be : CPP / C++ / C Code:
I will parse the arguments somehow, not sure it will be "RED","YELLOW" but probably "R12G10B0" to represent the RGB values. Now, obviously, an ansi-c solution is preferable ... though I'm not sure such exists. suggestions ? Kobi Hikri. __________________
It's actually a one time thing (it just happens alot). |
|
#2
|
||||
|
||||
Re: Printing colorful characters to the consoleHi kobi,
If you use linux gcc, then take a look at this: Colors in ANSI C using escape sequences Just to give you some information i found. Paramesh. __________________
Don't walk in front of me, I may not follow. Don't walk behind me, I may not lead. Just walk beside me and be my friend. |
|
#3
|
||||
|
||||
Re: Printing colorful characters to the consoleQuote:
Thank's Paramesh. I'll look into that information, though I'm not using linux gcc I might get some pointers there. Kobi Hikri. __________________
It's actually a one time thing (it just happens alot). |
|
#4
|
|||
|
|||
Re: Printing colorful characters to the consoleQuote:
I was blown away the first time I saw this tutorial site: (The colorful stuff starts in part 4.) Win32 Console Applications You might want to check it out. Regards, Dave |
|
#5
|
||||
|
||||
Re: Printing colorful characters to the consoleQuote:
I will check it out (print it out and take it to work Thanks, Kobi. __________________
It's actually a one time thing (it just happens alot). |
Recent GIDBlog
Writing a book by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Re: Things to Avoid in C/C++ -- gets() , Part 1 | WaltP | C Programming Language | 5 | 21-Jun-2007 13:13 |
| redirect char input console | amad1337 | C Programming Language | 7 | 25-Jul-2005 23:00 |
| fast characters in console | svhb | C Programming Language | 10 | 22-Jun-2005 08:13 |
| Can you change the background colors in a console app? | swashplate | C++ Forum | 3 | 07-Dec-2004 21:19 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The