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
FILE * fp = fopen("woorden.txt","rb"); | |
char tempBuffer[35]; | |
while(fgets(tempBuffer,sizeof(tempBuffer),fp)!=NULL) | |
{ | |
//we found a word.Let's assume its shorter than 35 characters and we can safe some space | |
int length = strlen(tempBuffer); | |
word = malloc(length*sizeof(char)); | |
strncpy(word,tempBuffer,length); |