Guest User

Untitled

a guest
May 10th, 2016
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.75 KB | None | 0 0
  1. /**
  2.  * dictionary.h
  3.  *
  4.  * Computer Science 50
  5.  * Problem Set 5
  6.  *
  7.  * Declares a dictionary's functionality.
  8.  */
  9.  
  10. #ifndef DICTIONARY_H
  11. #define DICTIONARY_H
  12.  
  13. #include <stdbool.h>
  14.  
  15. // maximum length for a word
  16. // (e.g., pneumonoultramicroscopicsilicovolcanoconiosis)
  17. #define LENGTH 45
  18.  
  19. /**
  20.  * Returns true if word is in dictionary else false.
  21.  */
  22. bool check(const char* word);
  23.  
  24. /**
  25.  * Loads dictionary into memory.  Returns true if successful else false.
  26.  */
  27. bool load(const char* dictionary);
  28.  
  29. /**
  30.  * Returns number of words in dictionary if loaded else 0 if not yet loaded.
  31.  */
  32. unsigned int size(void);
  33.  
  34. /**
  35.  * Unloads dictionary from memory.  Returns true if successful else false.
  36.  */
  37. bool unload(void);
  38.  
  39. #endif // DICTIONARY_H
Add Comment
Please, Sign In to add comment