Source code - color.zip

Find C and C++ source code to help you learn to program. You can submit your own code, or you can simply browse and download the code of others.

Index :: Utilities / color.zip
color.zip
resource information
Title color.zip
URL http://www.cprogramming.com/source/color.zip
Category 8
Description shows a way to change the color of the text in a text window.
Contact Michael Marques
Added 06-24-2003 at 07:22 p.m.
Last Updated 06-24-2003 at 08:23 p.m.
rating
Current Rating 4.82608695652174
Rate Resource
 
reviews
Number of Reviews 21
Review this Resource
Reviews:
  • proofreading service <a href="https://essaywritingservices.us.org">writing services</a> reliable essay writing service <a href=https://essaywritingservices.us.org>essay writing services</a>
    posted at 06:05 p.m. on 01-19-2018
  • loans no credit check <a href="https://loansnocreditcheck.us.com">money loans no credit check</a> loans no credit check <a href=https://loansnocreditcheck.us.com>the lending company</a>
    posted at 09:27 p.m. on 01-16-2018
  • payday installment loan <a href="https://installmentloans.us.com">installment loans</a> direct lenders online loans <a href=https://installmentloans.us.com>installment loans</a>
    posted at 08:55 p.m. on 01-13-2018
  • direct payday lenders bad credit <a href="https://quickloans.trade">no credit check emergency loans</a> quick loans <a href=https://quickloans.trade>quick loans 100 approval</a> college paper <a href="https://collegepaper.trade">research paper</a> term paper <a href=https://collegepaper.trade>college paper</a> best essay writing service <a href="https://bestessaywritingservice.science">ontario.ca homework help</a> paper writing service <a href=https://bestessaywritingservice.science>best essay writing service</a>
    posted at 02:09 p.m. on 01-13-2018
  • cash loan <a href="https://loan.us.org">payday loan</a> loan <a href=https://loan.us.org>loan</a>
    posted at 04:53 a.m. on 01-13-2018
  • direct loan lenders <a href="https://loan.us.org">payday loans</a> loan <a href=https://loan.us.org>payday loan</a>
    posted at 08:34 p.m. on 01-12-2018
  • car insurance <a href="https://carinsurance.us.org">compare auto insurance rates</a> car insurance <a href=https://carinsurance.us.org>commercial auto insurance quotes</a>
    posted at 01:08 a.m. on 12-24-2017
  • essay writing service <a href=https://essaywritingservices.us.com>essays writing services</a> essay writing service review <a href=https://essaywritingservices.us.com>essay writing service</a>
    posted at 02:33 p.m. on 11-01-2017
  • <a href=http://azithromycin247.us.com/>azithromycin</a> e98hd9uq3U
    posted at 03:22 p.m. on 09-14-2017
  • <a href=http://buycrestor.reisen/>buy crestor</a> <a href=http://buyzoloft.shop/>zoloft generic brand</a> <a href=http://levitrageneric.pro/>buy levitra from canada</a> <a href=http://buyindocin.shop/>buy indocin</a>
    posted at 02:10 p.m. on 09-13-2017
  • <a href=https://essaywritingservices.us.com/>cheap custom essay writing service</a> <a href=https://bestpaydayloansonline.us.com/>payday loans online</a>
    posted at 08:34 a.m. on 09-10-2017
  • wh0cd839808 <a href=http://metforminer.us.org/>Metformin ER</a> <a href=http://lexapro247.us.com/>cipralex</a> <a href=http://genericnexium.us.org/>generic nexium</a>
    posted at 12:45 a.m. on 08-25-2017
  • wh0cd332599 <a href=http://cialisprice247.us.org/>cheap cialis pills online</a> <a href=http://amitriptyline24.us.org/>amitriptyline without prescription</a>
    posted at 10:28 p.m. on 06-13-2017
  • PglqsM <a href="http://oplqxxsdcyqb.com/">oplqxxsdcyqb</a>, [url=http://iiftzlgbegfp.com/]iiftzlgbegfp[/url], [link=http://ultxzmxwvgba.com/]ultxzmxwvgba[/link], http://xfsupheawxiy.com/
    posted at 03:53 a.m. on 12-20-2016
  • OHQt12 <a href="http://akvebesdbhed.com/">akvebesdbhed</a>, [url=http://qlcamppzfhzo.com/]qlcamppzfhzo[/url], [link=http://wfcttnwyzwrb.com/]wfcttnwyzwrb[/link], http://tokkqdxkqarz.com/
    posted at 10:20 a.m. on 07-14-2016
  • gLLD1Y <a href="http://mlbmatustcgl.com/">mlbmatustcgl</a>, [url=http://rrcyfuawhdwg.com/]rrcyfuawhdwg[/url], [link=http://jhnklbsflzzj.com/]jhnklbsflzzj[/link], http://ndvgdemwgszb.com/
    posted at 11:19 p.m. on 07-02-2016
  • just add the line "system ("PAUSE");" right before the return of main. #include "global.h" //header files, function prototypes, & classes void setcolor(unsigned short color) { //begining of set color funtion HANDLE hCon = GetStdHandle(STD_OUTPUT_HANDLE); //gets std handle SetConsoleTextAttribute(hCon,color); //Sets Console Text Attribute HCon color. } //end of set color funtion int main() { //begining of main funtion printf("What color do you want the text to be?(1 = blue, 2 = green, 4 = red, 14 = yellow)"); //displays text scanf("%d", &C.I); //scans number setcolor(C.I); //sets color cout << " _____ ____ ____ _____\n"; //displays text cout << "|_ _|| __ || ___||_ _|\n"; //displays text cout << " | | | __||__ | |\n"; //displays text cout << " | | | |__ __| | | |\n"; //displays text cout << " |_| |____||____| |_|\n"; //displays text system ("PAUSE"); return 0; //returns 0 } //end of main function
    posted at 09:11 p.m. on 12-20-2004
  • lol people. Here's the thing, when programs are done running their tasks, they terminate, everything goes so fast you don't see anything, you just have to give it an infinate loop at the end before return. for(;;), while(1);, while(true); Either of those
    posted at 07:53 p.m. on 08-26-2004
  • I had to work a little to get the source to compile with Dev-C++ 4.9.8.7, but finally got it to work with warnings...i added the line "#include <iostream>" for cout, then before the functions "using namespace std;" for cout, and also to fix the problem of the program ending early, add the line "getchar();" TWO times before the return statement. sloppy code...
    posted at 08:13 p.m. on 04-05-2004
  • yeah... I dont understand it,,, "choose color 1=blue" you press 1, and the progg ends...wierd..
    posted at 11:13 a.m. on 03-13-2004
  • seems tow ork fine. when you run the .exe it ends before you have a real chance of seeing the colour but it is there.....
    posted at 07:42 p.m. on 11-30-2003