title: How can i get value of the structure element by it's pointer in C?
body: <p>Excuse me, if it is kinda silly, but I can't get value of the structure element by it's pointer.
  What should i put after "out = " to get "5"?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;conio.h&gt;
  
  typedef struct {
     int type;
     void* info;
  } Data;
  
  typedef struct {
      int i;
      char a;
      float f;
      double d;  
  } insert;
  
  Data* insert_data(int t, void* s)
  {
      Data *d = (Data*)malloc(sizeof(Data));
      d-&gt;type = t;
      d-&gt;info = s;
      return d;
  }
  
  int main()
  {
      Data *d;
      int out;
      insert in; 
      in.i = 5;
          d = insert_data(10, &amp;in);
      out = /*some int*/
      getch();
      return 0;
  }
  </code></pre>