Skip to content

Instantly share code, notes, and snippets.

Created May 3, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/177eed6b6faf9750602e to your computer and use it in GitHub Desktop.
Save anonymous/177eed6b6faf9750602e to your computer and use it in GitHub Desktop.
bool check(const char* word)
{
//alles naar kleine letters omzetten
char *woord2 = malloc (strlen(word));
strcpy(woord2, word);
for (int i = 0; i < strlen(woord2); i++)
if (isupper(word[i]))
{
woord2[i] = tolower(woord2[i]);
}
// Hashfunction
node* cursor = hashtable[hashletter];
while (cursor!=NULL)
{
if (strcmp(cursor->word,woord2) == 0)
{
free(woord2);
return true;
}
else
{
cursor = cursor->next;
}
}
free(woord2);
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment