Any function for changing the text color in Microsoft Visual Studio 2008? Thanks.
UltimateKnight
3
Light Poster
Recommended Answers
Jump to PostI need to add this to the output statement?
SetColors needs to be called with appropriate arguments before the output you want with a different color. It's also not a bad idea to save the current color attributes and restore them when you're done. That's pretty trivial with a sentry …
Jump to PostIt's an interesting approach, but the scoped color idea is a bit awkward... I would do something like this:
#include <iostream> #include <iomanip> #include <windows.h> struct Color { int color; Color(int color_): color(color_) {} Color operator + (const Color & other) const { return Color(this->color | other.color); …
All 8 Replies
Akill10
96
Posting Pro
UltimateKnight
3
Light Poster
Duoas
1,025
Postaholic
Featured Poster
UltimateKnight
3
Light Poster
Narue
5,707
Bad Cop
Team Colleague
Salem
commented:
Nice
+17
UltimateKnight
3
Light Poster
m4ster_r0shi
142
Posting Whiz in Training
Ancient Dragon
commented:
nice :)
+17
UltimateKnight
3
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.