title: strtoul() not working as expected?
body: <p>I am trying to convert a string such as "0x7ffd01767a60" to hexadecimal so I can compare pointers. Not sure if this is the best decision.</p>
  
  <p>I am doing this:</p>
  
  <pre><code>    char *address = "0x7ffd01767a60";
  
      strtol(address,NULL,16);
      printf("%lp",address);
  </code></pre>
  
  <p>And I am getting this: 0x7ffd01764120</p>
  
  <p>EDIT: It seems I was printing the string address ignoring the function return. Thanks Jens! and schlenk.</p>
  
  <p>SOLVED! This is what I do</p>
  
  <pre><code>    char *address = "0x7ffd01767a60";
      void *p;
      unsigned long int address_hex = strtol(address,NULL,16);
      p = (void*) address_hex;
  
      printf("%p",p);
  </code></pre>
  
  <p>printf prints the same memory address.</p>