Page 424 - C++
P. 424

}
               fp.close();
               cleardevice();
               settextstyle(3,0,2);
               outtextxy(200,200,"DO YOU WANNA CONTINUE");
               outtextxy(200,250,"    WITH THE GAME");
               outtextxy(160,300," Y FOR YES          N FOR NO");
               cin>>rep;
               rep=toupper(rep);
               if(rep=='N')
               {       fstream sc1;
                       sc1.open("d:/nir/score1.dat",ios::in| ios::out|ios::binary);
                       char sas[5], saa[5], sab[5], sac[5], sad[5], sae[5];
                       cleardevice();
                       sc1.seekg(0,ios::beg);
                       sc1.read((char*)&ss,sizeof(ss));
                       int p=sort1();
                       sc1.seekp(0,ios::beg);
                       sc1.write((char*)&ss,sizeof(ss));
                       if(p==1)
                       {
                          outtextxy(100,50,"CONGRATS! YOU HAVE MADE IT ");
                          outtextxy(100,80,"  TO THE BOARD OF ELITES.");
                          delay(1000);
                       }
                       outtextxy(220,120,"SCORECARD:");
                       itoa(ss.h[0],saa,10);
                       itoa(ss.h[1],sab,10);
                       itoa(ss.h[2],sac,10);
                       itoa(ss.h[3],sad,10);
                       itoa(ss.h[4],sae,10);
                       itoa(score,sas,10);
                       outtextxy(220,150,"I");
                       outtextxy(280,150,saa);
                       outtextxy(220,180,"II");
                       outtextxy(280,180,sab);
                       outtextxy(220,210,"III");
                       outtextxy(280,210,sac);
                       outtextxy(220,240,"IV");
                       outtextxy(280,240,sad);
                       outtextxy(220,270,"V");
                       outtextxy(280,270,sae);
                       outtextxy(200,400,"YOUR SCORE");
                       outtextxy(350,400,sas);
                       getch();
                       sc1.close();
                       getch();
                    }
                    cleardevice();
               }while(rep=='Y');
               fp.close();
        }
        //*********************************************************************
   419   420   421   422   423   424   425   426   427   428   429