From 2eb4543b148daa49dae229f6ddf11b8bc354cfd6 Mon Sep 17 00:00:00 2001 From: Tyge Løvset <60263450+tylov@users.noreply.github.com> Date: Mon, 22 Jun 2020 21:56:03 +0200 Subject: Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 6bbc5cf5..35cf4485 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,8 @@ int x = chash_si_get(&map, "mykey")->value; // no allocation of string key happe An alternative would be to use *char* * as key type, but you would have to manage the memory of the hash char* keys yourself. Note that this customization is also available for **CVector**, but only affects the *find()* function currently. See *declare_CVector_string()*. +Also look at **examples/advanced.c**, it demonstrates how to use a custom struct as a hash map key, using the feature mentioned. + Demos ----- The first example has a complex nested container type, which demonstrates some of the capabilities of the library. Look at the simpler examples below to understand it better. The example adds an element into the data structure, and then accesses it. The type used, with c++ template syntax is: -- cgit v1.2.3