title: Access values of structs from a pointer in a struct
body: <p>I'm going to try and keep this as brief as possible.
  So I have two structs: </p>
  
  <pre><code>typedef struct someStruct named;
  struct someStruct {
      void *key;                  
      void *value;                    
  };
  typedef struct anotherStruct namedToo;
  struct anotherStruct {
      named **table;          
      unsigned int size;          
  };
  </code></pre>
  
  <p>Okay great, now ingore any possible mistakes above, this is uneditable code.</p>
  
  <p>Now I have two methods:</p>
  
  <pre><code>namedToo *init(float ignoreThis) {
      namedToo *temp;
      temp = malloc(sizeof(namedToo)); //some memory for the second struct
      temp-&gt;table = malloc(sizeof(named)*100); //lets say this 100 is for 100 buckets/cells/named elements
      return temp;
  </code></pre>
  
  <p>Method 2:</p>
  
  <pre><code>int insert(namedToo *temp, void* key, void* value) {
       temp-&gt;table[0]-&gt;key = key; //My problem, I need to access the value and key inside named from the pointer inside namedToo. How can I do this?
  }
  </code></pre>
  
  <p>The comment has my problem : 
  My problem, I need to access the value and key inside named from the pointer inside namedToo. How can I do this? I would need to change and grab value/key on their own from time to time.</p>