cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
some questions...
some questions...
Mar 21, 2009 at 3:44pm UTC
Harlequin
(66)
How do we give colour to the text?
How do we set color to the background?
Mar 21, 2009 at 5:33pm UTC
Bazzy
(6281)
If on Windows
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), color )
where color is a 2byte number, the higher byte gives the background, the lower byte gives text color eg: 0x0C is red text (0xC) in black background (0)
http://msdn.microsoft.com/en-us/library/ms686047.aspx
Mar 24, 2009 at 1:44pm UTC
Harlequin
(66)
thank you....
Topic archived. No new replies allowed.