title: Void * to char or int in C
body: <p>I want to get any types of variables in my code, so I did a void * type to accept others. But I can get in char * but not in int values. And I don't understand how I can did it.
  Here my code :</p>
  
  <pre><code>void    insertion(t_liste *liste, void *newValue) {
    t_element *new = malloc(sizeof(void *));
    int i;
    int *j = &amp;i;
  
    if (liste == NULL || new == NULL) {
      exit(EXIT_FAILURE);
    }
    if (newValue == j || (char *)newValue) {
       new-&gt;value = newValue;
       new-&gt;suivant = liste-&gt;premier;
       liste-&gt;premier = new;
       liste-&gt;taille++;
       new-&gt;index = liste-&gt;taille;
    }
  }
  </code></pre>
  
  <p>In my main I did </p>
  
  <pre><code>insertion(maListe, 5);
  </code></pre>
  
  <p>it didn't work, but if I did this:</p>
  
  <pre><code>insertion(maListe, "test");
  </code></pre>
  
  <p>It works.
  But I want both works !
  Here my .h</p>
  
  <pre><code>typedef struct s_element t_element;
  typedef struct s_liste t_liste;
  
  struct s_element{
    int           index;
    void          *value;
    t_element     *suivant;
    t_element     *precedent;
  };
  
  struct s_liste{
    t_element     *premier;
    t_element     *dernier;
    int           taille;
  };
  </code></pre>
  
  <p>Any idea ?</p>