Colored output on console

A

abubakar

Hi all,

in vc++ 2k5 (all native, no clr) can I color my output. All I know right now
to output things are through printf and cout, but they just display output
in the default colors. Is there anything that would support colored fonts
output?

Thanks,

...ab
 
C

Cholo Lennon

abubakar said:
Hi all,

in vc++ 2k5 (all native, no clr) can I color my output. All I know
right now to output things are through printf and cout, but they just
display output in the default colors. Is there anything that would
support colored fonts output?

There is not a portable way. Under Windows you should use
SetConsoleTextAttribute. For more details take a look to:

"Console Functions"
http://msdn.microsoft.com/en-us/library/ms682073(VS.85).aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top