Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
editing a file/arrays from a file
I need some help in code,
If u are say, making a game, right, and someone gets a high score (saved as ‘score’); and it is in 2nd place out of 3, how can you shift down the other scores. I am using arrays of records to store name and score
person[count].scr (for score);’
im saving the files in high.txt
what im doing is reading the values from file, when ‘score>person[count].scr then begin’
and I don’t know how to make the scores below that one shift down and in turn, the score 3 will be deleted.
So if the score is 1st then ‘
and person.scr := and person.scr;
e.t.c e.t.c …..
is there an easier way that incorporates counts and so on…
0 · ·