// Declares a dictionary's functionality


#include <stdbool.h>

// Maximum length for a word
// (e.g., pneumonoultramicroscopicsilicovolcanoconiosis)
#define LENGTH 45

// Prototypes
bool load(const char *dictionary);
unsigned int size(void);
bool check(const char *word);
bool unload(void);

#endif // DICTIONARY_H

why stdbool.h is included here and not other libraries( that contain int and char types )


The dictionary.h file contains the prototypes for functions that return bool types. In order to do this, it has to guarantee that the bool type is defined, so the stdbool.h library has to be included.

The other data types, int and char, are native to c. There's no library that needs to be included to use them. They're automatically defined and available.

As for functions that may be contained in the functions defined by the signatures, well, the includes belong in the .c file, not the .h.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .