最近几天我一直在研究问题集拼写器,到目前为止这就是我所拥有的。不幸的是,它无法编译,我有点迷失了。如果有人能帮助我并告诉我我做错了什么,我将非常感激。
// Implements a dictionary's functionality
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <stdlib.h>
#include "dictionary.h"
#define HASHTABLE_SIZE 65536
// A struct for a node
typedef struct node
{
// Length is up to 45 + 1 for the Null
char word[LENGTH + 1];
// A pointer to the next node
struct node *next;
}
node;
node *hashtable[HASHTABLE_SIZE];
node *head = NULL;
// Hashes words
// Thanks to the husband of reddit user delipity for providing the function …Run Code Online (Sandbox Code Playgroud)