StringIntMap.h 385 B

123456789101112131415161718
  1. #ifndef STRINGINTMAP_H
  2. #define STRINGINTMAP_H
  3. #include <stdbool.h>
  4. typedef struct {
  5. int capacity;
  6. int entries;
  7. const char** stringData;
  8. int* intData;
  9. } StringIntMap;
  10. void simInit(StringIntMap* sim);
  11. void simDelete(StringIntMap* sim);
  12. bool simSearch(StringIntMap* sim, const char* s, int* mapping);
  13. bool simAdd(StringIntMap* sim, const char* s, int* mapping);
  14. #endif