|
@ -10,6 +10,7 @@ void willkommen(); |
|
|
int namePruefen(); |
|
|
int namePruefen(); |
|
|
void nameWaehlen(); |
|
|
void nameWaehlen(); |
|
|
void startauswahl(); |
|
|
void startauswahl(); |
|
|
|
|
|
void nameAusgeben(); |
|
|
|
|
|
|
|
|
void protokoll(){ |
|
|
void protokoll(){ |
|
|
clear_screen(); |
|
|
clear_screen(); |
|
@ -97,4 +98,35 @@ void startauswahl() { |
|
|
} else { |
|
|
} else { |
|
|
printf("Eingabe ungueltig"); |
|
|
printf("Eingabe ungueltig"); |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void nameAusgeben(){ |
|
|
|
|
|
char KonfDatei[100]; |
|
|
|
|
|
char name[50]; |
|
|
|
|
|
int i = 5; |
|
|
|
|
|
int zaehler = 0; |
|
|
|
|
|
int nullt; |
|
|
|
|
|
|
|
|
|
|
|
FILE *fp = NULL; |
|
|
|
|
|
fp = fopen("hangman.txt", "r"); |
|
|
|
|
|
|
|
|
|
|
|
fscanf(fp, "%s", KonfDatei); |
|
|
|
|
|
while(KonfDatei[i] != ','){ |
|
|
|
|
|
zaehler++; |
|
|
|
|
|
i++; |
|
|
|
|
|
} |
|
|
|
|
|
nullt = zaehler; |
|
|
|
|
|
while(zaehler != 0){ |
|
|
|
|
|
name[--zaehler] = KonfDatei[--i]; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
i = 0; |
|
|
|
|
|
while(name[i] != 0){ |
|
|
|
|
|
i++; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
name[nullt] = '\0'; |
|
|
|
|
|
printf("%s\n", name); |
|
|
|
|
|
|
|
|
|
|
|
fclose(fp); |
|
|
} |
|
|
} |