Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29276 Discussions

Any way to get COLORED text in a console app?

WSinc
New Contributor I
540 Views
I would like to have text in different colors (for color-coding) and wondering if there is a simple way
to do it using ordinary FORMAT statements. I would rather avoid having to go to a special graphics library,
even though it is pretty easy to get colored text that way.

Is there a library routine for regular console apps that can switch colors, perhaps in the middle of a line?
0 Kudos
1 Reply
GVautier
New Contributor III
540 Views
Hello

See the SetConsoleTextAttribute function and other console functions in http://msdn.microsoft.com/en-us/library/ms682073%28v=VS.85%29.aspx



0 Kudos
Reply