void showScoreboard(Player player[]) { FILE *scoreboardFile = fopen("scoreboard.txt", "r"); int i; /*system("CLS");*/ /*READ SCORES FROM TEXTFILE*/ for(i=0; i player[i+1].points) { tempPoints = player[i].points; /*tempName = player[i].name;*/ player[i].points = player[i+1].points; /*player[i].name = player[i+1].name;*/ player[i+1].points = tempPoints; /*player[i+1].name = tempName;*/ } } } fclose(scoreboardFile); FILE *scoreboardFile2 = fopen("scoreboard.txt", "w"); void rewind ( FILE * scoreboardFile2 ); /*WRITE SORTED SCORES TO TEXTFILE*/ for(i=0; i