ASCII iColored n C/C++ URGENT!
ASCII iColored n C/C++ URGENT!
How do you do that?
I mean, how do you write ascii characters with color?
cout, printf?
Is there any function such as LocateText(x,y) or something?
Is there any way to access a linear buffer of characters in the screen? (i mean in a polite way, non assembly, i mean standard ansi c, etc)
Please help!!!
ElPeque
__________________
Alejandro Martínez
__________________Alejandro Martínez
quote: Original post by ElPeque
i mean standard ansi c
can't be done.
fast enough?
edit: and PLEASE remove all your other crossposts. few things are more annoying than people crossposting all over the place.
[edited by - niyaw on December 1, 2002 12:23:45 AM]
December 01, 2002 11:25 PM
It''s not part of the ansi standard. What you want to do is inherently platform dependent. I think there is a library called "curses" that does what you want.
you are right...
im sorry about that...
___________
Is that true?
i can''t believe it.
WTF!
Even pascal can do that!
and QBASIC!
;O/
__________________
Alejandro Martínez
im sorry about that...
___________
Is that true?
i can''t believe it.
WTF!
Even pascal can do that!
and QBASIC!
;O/
__________________
Alejandro Martínez
__________________Alejandro Martínez
if it''s a windows app.. you can use SetBkColor... etc
There IS a way to generate colored text in a console, but I don''t know how to do that.
There IS a way to generate colored text in a console, but I don''t know how to do that.
The nightmare travels across the cosmos with his burning mane. The trail of ash that is produced.
?Have a nice day!?
Im compiling a console program with the compiler "Cygwin". I think it is a port of the UNIX c compiler. So i think ill have to stick to standard (?) c only.
Thanks a lot for the help!! =O)
__________________
Alejandro Martínez
Thanks a lot for the help!! =O)
__________________
Alejandro Martínez
__________________Alejandro Martínez
December 01, 2002 11:45 PM
Well pascal and basic can do it because they call a library written specifically for the platform they are running on. C has libraries that do these things too, it is just not part of the core language.
windows.h has the functions you''ll want to use. It''s pretty easy. All you need to do is allocate an array of CHAR_INFO ''s, with the size of the console width * console height, then set any CHAR_INFO in the array using: buffer[(x + (y * width))]
then write your buffer to the screen using some method I can''t remember the name of. Look it up.
then write your buffer to the screen using some method I can''t remember the name of. Look it up.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement