title: C++. Error: void is not a pointer-to-object type
body: <p>I have a C++ program:</p>
  
  <pre><code>struct arguments
  {
    int a, b, c;  
    arguments(): a(3), b(6), c(9) {}
  };
  
  class test_class{
    public:
  
      void *member_func(void *args){
        arguments vars = (arguments *) (*args); //error: void is not a 
                                                //pointer-to-object type
  
        std::cout &lt;&lt; "\n" &lt;&lt; vars.a &lt;&lt; "\t" &lt;&lt; vars.b &lt;&lt; "\t" &lt;&lt; vars.c &lt;&lt; "\n";
      }
  };
  </code></pre>
  
  <p>On compile it throws an error:</p>
  
  <pre><code>error: ‘void*’ is not a pointer-to-object type
  </code></pre>
  
  <p>Can someone explain what I am doing wrong to produce this error?</p>