attractivechaos / klib

A standalone and lightweight C library
http://attractivechaos.github.io/klib/
MIT License
4.18k stars 556 forks source link

How to store a structure in a hash #95

Closed Globik closed 5 years ago

Globik commented 6 years ago

Is it possible to struct in a hash?

conchoecia commented 5 years ago

Yes - just initialize the struct values after using kh_put. I have used structs up to 16 bytes successfully.