title: How to store a memory address in an integer?
body: <p>This is exactly the same question title as found <a href="https://stackoverflow.com/questions/9026661/how-to-store-a-memory-address-in-c">here</a> - I would also like to store a memory address in a variable - or rather, a <code>void*</code> in a variable. However, I'd rather store it in some form of an <code>int</code> rather than a <code>string</code>, as I'd like to cast it back to a pointer afterwards.</p>
  
  <p>This is because it is a member of a class that I would then like to serialize with boost serialize, and if I did use a <code>void*</code>, boost serialize might try to store what the pointer is pointing to, which wouldn't be very sensible in my case.</p>
  
  <p>I need this for 32 and 64 bit gcc and MSVC, so basically I was wondering whether there was an inbuilt integer type that was the size of pointers on the same platform. Alternatively, I guess I would need to <code>IFDEF</code> my own type?</p>