title: How to print the void * in a function and how to access the void * variable in a function?
body: <p>I'm trying to pass a function as argument to another function with <code>void</code> pointer and it doesn't work</p>
  
  <pre><code>#include "header.h"
  void print ( void *Arg )
  {
  //  while ( ( int *) Arg[0] )
      {
          printf ( "Arg[0] = %d Arg[1] = %d\n",(int *)  Arg[0], (int * ) Arg[1] );
          sleep ( 1 );
          //Arg[0]--;
          //Arg[1]--;
      }
  }
  void main(int argc, char **argv)
  {
      int count[2] = { 10, 160};
      print (count);
  }
  </code></pre>
  
  <p>I Am getting errors like this:</p>
  
  <pre><code>void*.c: In function ‘print’:
  void*.c:6:52: warning: dereferencing ‘void *’ pointer [enabled by default]
     printf ( "Arg[0] = %d Arg[1] = %d\n",(int *)  Arg[0], (int * ) Arg[1] );
                                                      ^
  void*.c:6:3: error: invalid use of void expression
     printf ( "Arg[0] = %d Arg[1] = %d\n",(int *)  Arg[0], (int * ) Arg[1] );
     ^
  void*.c:6:69: warning: dereferencing ‘void *’ pointer [enabled by default]
     printf ( "Arg[0] = %d Arg[1] = %d\n",(int *)  Arg[0], (int * ) Arg[1] );
                                                                       ^
  void*.c:6:3: error: invalid use of void expression
     printf ( "Arg[0] = %d Arg[1] = %d\n",(int *)  Arg[0], (int * ) Arg[1] );
  </code></pre>
  
  <p>How do I fix the problem?</p>