Created
December 11, 2014 08:02
-
-
Save metrafonic/77464f7c40e3aaeff3da to your computer and use it in GitHub Desktop.
leshangman
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int lesHangmanOrd(){ | |
| char tempOrd[30]; | |
| int i=0; | |
| FILE * ordFil = NULL; | |
| ordFil=fopen("Hangman.txt", "r"); | |
| do{ | |
| fscanf(ordFil, "%s", tempOrd); | |
| strcpy(hangmanOrd[i], tempOrd); | |
| i++; | |
| }while(!feof(ordFil) && i<N); | |
| fclose(ordFil); | |
| if (i>1){ | |
| return i; | |
| }else{ | |
| printf("ERROR: Feil i ordlisten\n"); | |
| return -1; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment