summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2020-06-22 21:56:03 +0200
committerGitHub <[email protected]>2020-06-22 21:56:03 +0200
commit2eb4543b148daa49dae229f6ddf11b8bc354cfd6 (patch)
tree9d76d6c6693b29b0caabffd9008dd239ebbf3de8
parent27772673dbd49ea74d79865fd0c837c5f6173f13 (diff)
downloadSTC-modified-2eb4543b148daa49dae229f6ddf11b8bc354cfd6.tar.gz
STC-modified-2eb4543b148daa49dae229f6ddf11b8bc354cfd6.zip
Update README.md
-rw-r--r--README.md2
1 files changed, 2 insertions, 0 deletions
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: