title: Implement a hash table
body: <p>I'm trying to create an efficient look-up table in <strong>C</strong>.</p>
  
  <p>I have an integer as a key and a variable length <code>char*</code> as the value.</p>
  
  <p>I've looked at <code>uthash</code>, but this requires a fixed length <code>char*</code> value. If I make this a big number, then I'm using too much memory.</p>
  
  <pre><code>struct my_struct {
      int key;
      char value[10];             
      UT_hash_handle hh;
  };
  </code></pre>
  
  <p>Has anyone got any pointers? Any insight greatly appreciated.</p>
  
  <hr>
  
  <p>Thanks everyone for the answers. I've gone with <code>uthash</code> and defined my own custom struct to accommodate my data.</p>