title: How to dynamically create and read structs in C?
body: <p>How can I do something like that (just an example):</p>
  
  <pre><code>any_struct *my_struct = create_struct();
  add_struct_member(my_struct, "a", int_member);
  add_struct_member(my_struct, "b", float_member);
  </code></pre>
  
  <p>So that I could load and use a struct instance "from the outside" (at the address <code>addressOfMyStruct</code>) with the given structure here?</p>
  
  <pre><code>any_struct_instance *instance = instance(my_struct, addressOfMyStruct);
  int a = instance_get_member(instance, "a");
  float b = instance_get_member(instance, "b");
  </code></pre>
  
  <p>I would also like to be able to create struct instances dynamically this way.</p>
  
  <p>I hope it's clear what I want to do. I know that <a href="http://cinvoke.nongnu.org/doc/cinvoke_8h.html" rel="noreferrer" title="C/Invoke">C/Invoke</a> is able to do it, but is there a separate library to do that?</p>