Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "dictionary.h"
- char *find(const struct dictionary *dict, const char *key)
- {
- if (key == NULL || dict == NULL)
- return NULL;
- for (int i = 0; i < dict->size; i++)
- {
- if (strcmp(dict->data[i].key, key)==0)
- return dict->data[i].value;
- }
- return NULL;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement