1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
class highScore
{
int scor;
char name[50];
public:
void tempStore(int &score);
void entername(int score)
{
setcolor(BLUE);
bar(130,100,530,380);
setcolor(RED);
settextstyle(0,0,0);
gotoxy(20,12);
cout<<"Score : ";
cout<<score;
gotoxy(20,14);
cout<<"Enter your name : ";
gets(name);
}
void display(int scor)
{
char prtsco[100];
setcolor(BLUE);
bar(100,100,630,470);
setcolor(GREEN);
settextstyle(0,0,1);
outtextxy(100,100,name);
sprintf(prtsco,"%d",scor);
outtextxy(100,130,prtsco);
}
}P;
|