View Single Post
  #10  
Old 03-07-2002, 04:35 AM
Chef
 
Posts: n/a
Default Re: How do you change to color of the text in c++.

Nothing I can be proud of, but if you insist :

#include<stdio.h>
#include<conio.h>
#include<dos.h>
#include<stdlib.h>
#include<graphics.h>
main(){
clrscr();
printf("Experience the power of Chef now ...");
delay(10000);
clrscr();
randomize();
gotoxy(1,25);printf("Visit www.cheflab.com for BETTER things ");
for(int i=0;i<1000;i++)
{
sound(random(2000));
delay(20);

textcolor(random(14)+1);

gotoxy(random(6+1,random(24)+1);
cprintf("ChefruleZ");
}
nosound();
}

Again, first time in last 2 years  

Cheers
Chef
Reply With Quote