title: Comparing values pointed at by void pointers in C
body: <p>I need to compare the values of two <code>void</code> pointers in C.  In the code below, I'm getting the console print out that they are different. It seems that the comparison is between the addresses contained in these two <code>void</code> pointers.</p>
  
  <p>How can I make it so that the code compares values (ie: <code>1 == 1</code>) of the <code>void</code> pointers and prints <code>"same"</code>?</p>
  
  <pre><code>int main(void)
  {
      int i = 1;
      int j = 1;
      void *pi = &amp;i;
      void *pj = &amp;j;
      if (pi == pj) {
          printf("same.\n");
      } else {
          printf("different.\n");
      }
      return 0;
  }
  </code></pre>