title: gcc: error: request for member ‘rlen’ in something not a structure or union
body: <p>I have a unsigned char pointer which contains a structure.Now I want to do the following</p>
  
  <pre><code>unsigned char *buffer ;
  
  //code to fill the buffer with the relavent information.
  
  int len = ntohs((record_t*)buffer-&gt;len);
  </code></pre>
  
  <p>where record_t structure contains a field called len.I am not able to do so and am getting the error.</p>
  
  <pre><code>error: request for member ‘len’ in something not a structure or union.
  </code></pre>
  
  <p>what am I doing wrong here?</p>