title: Is this use of struct pointers correct?
body: <p>I have this struct:</p>
  
  <pre><code>typedef struct Grades {
  int  grade1;
  int  grade2;
  int  grade3;
  int  grade4;
  int  grade5;
  }
  </code></pre>
  
  <p>I created a pointer to a Grades struct using</p>
  
  <pre><code>struct Grades   *pointer;
  </code></pre>
  
  <p>and I have a function() that returns a (void *) pointer to a specific Grades struct.</p>
  
  <p>How do I set my pointer to that specific struct using the (void *) pointer?</p>
  
  <p>I was thinking:</p>
  
  <pre><code>pointer = &amp;function();
  </code></pre>
  
  <p>but that gives me an error: "'&amp;' requires l-value</p>
  
  <p>Any ideas? And by the way, I can't modify the function so...</p>