I'm working on a library for a user to use and manage with the function prototypes I provide within my header file. Now I have a working hashtable setup in manager.c but I'm at a loss at how to tackle this. I basically want to keep the hashtable "under the hood" from the user by providing them with
typedef struct Manager {
int size;
HashList **table;
} Manager;
so they can create this Manager object and use my provided functions to manipulate its contents. However, HashList is declared in my manager.c as
typedef struct HashList {
/*
* data stored here
*/
struct HashList *next;
} HashList;
Now obviously this will not compile as HashList must be in my header file since struct Manager uses HashList. But I do not want HashList to be in the header file as the user shouldn't explicitly have access to this as my functions manipulate the data stored at each hash.
Any advice?