# include "graphics. H"
# include "conio. H"
Void PIC (void);
Void CPA (void);
Void cir (int x, int y, int r, int color);
Void main (void)
{
Int driver=DETECT mode;
Initgraph (& amp; Driver, & amp; Mode, "");
PIC ();
Getch ();
CPA ();
Closegraph ();
}
Void PIC (void)
{
int i;
for(i=1; i<16. I++)
Cir (40 * I, 350, 20, I);
}
Void cir (int x, int y, int r, int color)
{
Setcolor (WHITE);
Setfillstyle (1 color);
Circle (x, y, r);
Floodfill (x, y, WHITE);
}
Void CPA (void)
{
Int I=1, j=1;
While (1)
{
for(i=1; i<16. I++)
{
Setpalette (I, I + j);
Sleep (2000);
If (kbhit ())
return;
}
j++;
If (j==16)
j=1;
}
}
This is by TC program to VC, but the error C2065: 'setpalette: undeclared identifier this error, check on the Internet also does not have a solution, hope can be given by predecessors solution, thank you very much,
CodePudding user response:
Try & lt; Stdio. H>CodePudding user response: