![]() |
| ||
| How to code a program that can show color text output??? can someone teach me or show me how to code a program that can output color text?? thx :p |
| ||
| Re: How to code a program that can show color text output??? This is an implementation-dependent operation. Without knowing your platform and compiler, we can't help you at all. |
| ||
| Re: How to code a program that can show color text output??? i am using dev c++ 4.9.9 compiler and windows xp below is a simple source code #include<iostream> using namespace std; int main() { cout<<"Hello"<<endl; system("pause"); return 0; } how to let the program print the "hello" string with color and also how to set the background color?? |
| ||
| Re: How to code a program that can show color text output??? Search MSDN for SetConsoleTextAttribute. |
| ||
| Re: How to code a program that can show color text output??? still can't understand can u show me some example source code |
| ||
| Re: How to code a program that can show color text output??? >still can't understand can u show me some example source code No, why don't you try experimenting instead of mooching off everyone else. This isn't a terribly difficult task, and by working it out on your own you'll learn much more than if I just gave you code to copy. |
| ||
| Re: How to code a program that can show color text output??? i really dun understand all the things in MSDN |
| ||
| Re: How to code a program that can show color text output??? Looks like Narue is in the usual good mood this morning. You have to forgive! Good person though! I took BCX, the basic to C translator, and figured it out in 5 minutes flat. Here is the C code. You may throw in a little C++ lingo. The name of the WinApi header may be different with your compiler. Play with k a little to get the feel! // change text color in Windoze console modeActually, programming can be fun ... a man, sorry, person over machine thing! |
| ||
| Re: How to code a program that can show color text output??? thx for ur help vegaseat. Do u know how to let the text in the program blink??? |
| ||
| Re: How to code a program that can show color text output??? Do you now see what happens vegaseat? If you give them the answer then they'll stop thinking for themselves--assuming they thought for themselves in the first place--and expect you to continue giving them the answer. The goal here is not to solve the problems of others, but to teach others how to solve their own problems. >Do u know how to let the text in the program blink??? I know how to make text blink, but I'm not going to tell you because one method is easy to figure out using what you just learned. |
| All times are GMT -4. The time now is 7:05 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC