0

ok here I want to know how to make colorated output in C and C++...

For example: I want to print this string "zelena". The color must be green. Now how to get green output using printf() in C and cout << "zelena";

5
Contributors
8
Replies
9
Views
10 Years
Discussion Span
Last Post by apurv
0

Simple, use the SetConsoleTextAttribute() method from the Windows API

Yeah, but i want to get colored output using printf() function...

Also I`m still complete n00b..

0

Im realy confused now...could you write an example?

Search the snippets section. You'll find code for that.

0

every chatacter occupies 2 Bytes in VDU memeory.
First is for its ascii value, while next for its color.
To change the color of the text, u need to change this Byte.

U must be able to right the required code for this now.
and one more thing, forget 'printf'

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.