Browse Source

Name wir in Textdatei gespeichert

main
fdai7172 2 years ago
parent
commit
23dd3242a6
  1. 3
      src/Paper-Bin.c

3
src/Paper-Bin.c

@ -111,6 +111,7 @@ void Generatefield() {
void addScoreboard()
{
int ScorePoints;
//Die txt wird geöffnet
FILE* fp = fopen("ScoreBoard.txt", "a+");
char name[255];
@ -118,5 +119,7 @@ void addScoreboard()
printf("Bitte gib deinen Namen ein:\n");
scanf("%s", name);
fprintf(fp, "%s %d\n", name, ScorePoints);
fclose(fp);
}
Loading…
Cancel
Save