• Advertisement

Archived

This topic is now archived and is closed to further replies.

ASCII iColored n C/C++ URGENT!

This topic is 5619 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement