Console ANSI colour

Started by
3 comments, last by GodBeastX 18 years, 7 months ago
in C++ :) i need to append to string then just cout, but i dont know any of the escape sequences and cant find them.
-www.freewebs.com/tm1rbrt -> check out my gameboy emulator ( worklog updated regularly )
Advertisement
Googling for ansi escape sequences seems to turn up a lot of hits.
If I remember correctly, you just can't use cout - you need to write directly to the console...

More shameless self-whoring can be found here. Hope that helps...
There are a couple of functions for less direct-access problems, such as SetConsoleTextAttribute.

[Website] [+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++]

I think you should be able to use cout, I don't see why not.

However, I'm not certain the console of NT/9x handles ansi escape sequences right off the bat. In dos for example you had to load ansi.sys in order to support escape sequences. Might have to load some sort of ansi driver in newer windows too, don't quote me on that. Like stated earlier, windows has it's own console coloring handlers, and I'd recommend using those instead.

This topic is closed to new replies.

Advertisement