Of course. Make a linked list which holds instances of structs. In these structs, you save a char array with the name (or a STRING, if you like) and an entity pointer. Then you write these functions:
- putEnt(ENTITY* ent, char* name) //register an entity
- getEnt (char* name) //returns an entity pointer to the entity
- delEnt(char* name) // deletes the entity with the name
- delEnt(ENTITY* ent) //deletes the entity just from the list, but not from memory (the entity is still available)
- renEnt (char* name, char* newName) //renames the entity with given name into the new name
- renName(ENTITY* ent, char* newName) //renames the entity with the given new name
If you don't know how to do this, contact me via pm/email.
Cheers,
Christian