title: Getting the value inside a pointer pointed by another pointer?
body: <p>I have a queue that stores thread structures</p>
  <pre><code>struct x
  {
      int n;
      char *c;
      void *f;
  
  };
  
  </code></pre>
  <p>The function below returns a structure defined as the following:</p>
  <pre><code>struct s {
      void *data;
  };
  </code></pre>
  <p>When I call <code>*new = allocate(&amp;x_ptr)</code>, how can I access the members of <code>x</code>?</p>
  <p>I tried the following but it does not work:</p>
  <p><code> printf(&quot;%d\n&quot;, new -&gt;data-&gt;n)</code></p>
  <p>I get this error: request for member ‘n’ in something not a structure or union</p>