Ok awhile ago I posted asking about random characters and delays and such and one guy(unregistered)was nice enough to post his source code. It didn't quite work on my compiler but I decided to give it a try and I worked it down to this last error:
error C2660: 'textcolor' : function does not take 1 parameters
I belive that I know what it means but I don't know what to put in the function prototype brackets like one could be:
void new( double x, double y, double z )
what is the proper thing to put in the brakets for color?
Now like I said I tried to get his code to work in my compiler so if things are wrong please tell me, so far though the error mentioned above is the only one, thanks.
Code:#include <stdio.h> #include <stdlib.h> #include <time.h> #include <dos.h> #include <conio.h> delay(int); randomize(); clrscr(); textcolor(); LIGHTGREEN(); void showwhirl() { int i, j; char whirl[] = {'|','/','-'/*,''*/}; for (i=0;i<=2; i++) { for (j=0; j<=3; j++) { printf("%c", whirl[j]); delay(20); printf("b"); } } } void printline(char line[30]) { int i; for (i=0; line[i]; i++) { showwhirl(); printf("%c", line[i]); } } main() { int i; randomize(); clrscr(); textcolor(LIGHTGREEN); do { for(i=1; i<=40; i++) { cprintf("%c ", 49 + rand()%156); } delay(rand()%250); } while (!kbhit()); clrscr(); printline("Programmed By Maharshi Akilla"); printf("\n"); printline("http://mahurshi.tripod.com"); getch(); do { } while (!kbhit()); return 0; }



LinkBack URL
About LinkBacks


