Colored output on console

  • Thread starter Thread starter abubakar
  • Start date Start date
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
 
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
 
Back
Top