title: Conversion from 'void*' to pointer to non-'void' requires an explicit cast (Line 17)
body: <p>I'm following the book Learn C the Hard Way and when I try to run this program I get this error message:</p>
  
  <blockquote>
    <p>Conversion from 'void*' to pointer to non-'void' requires an explicit cast.</p>
  </blockquote>
  
  <p>I'm not sure how to resolve this, do I have to change the return variable in the struct?</p>
  
  <p>Take a look anyway, here the code: (Compiling on Visual C++ 2010, haven't tried GCC yet).</p>
  
  <pre><code>   //learn c the hardway
  
    #include &lt;assert.h&gt;
    #include &lt;stdlib.h&gt;
    #include &lt;string.h&gt; 
    #include &lt;stdio.h&gt;
  
    struct Person {
        char *name;
        int age;
        int height;
        int weight; 
    };
  
    struct Person *Person_create(char *name, int age, int height, int weight) 
    {
        struct Person *who = malloc(sizeof(struct Person)); 
        assert(who != NULL);
  
        who-&gt;name = strdup(name);
        who-&gt;age = age; 
        who-&gt;height = height;
        who-&gt;weight = weight;
  
        return who;
    } 
  
    void Person_destroy(struct Person *who)
    {
        assert(who != NULL);
  
        free(who-&gt;name);
        free(who);
    }
  
    void Person_print(struct Person *who) 
    {
        printf("Name: %s\n", who-&gt;name);
        printf("\tAge: %d\n", who-&gt;age); 
        printf("\tHeight: %d\n", who-&gt;height);
        printf("\tWeight: %d\n", who-&gt;weight); 
    }
  
    int main(int argc, char *argv[])
    {
        // make two people structures 
        struct Person *joe = Person_create(
                "Joe Alex", 32, 64, 140);
  
        struct Person *frank = Person_create(
                "Frank Blank", 20, 72, 180); 
  
        // print them out and where they are in memory 
        printf("Joe is at memory location %p:\n", joe);
        Person_print(joe);
  
        printf("Frank is at memory location %p:\n", frank);
        Person_print(frank); 
  
        // make everyone age 20 years and print them again 
        joe-&gt;age += 20;
        joe-&gt;height -= 2;
        joe-&gt;weight += 40; 
        Person_print(joe);
  
        frank-&gt;age += 20;
        frank-&gt;weight += 20; 
        Person_print(frank);
  
        // destroy them both so we clean up 
        Person_destroy(joe);
        Person_destroy(frank);
  
        return 0;
    }
  </code></pre>