how to offset the memory location indicated by an object in C++
<p>I have this implementation in C#:</p>

<p>if I am not wrong, it is used to: offsetting the memory location indicated by allocatedObject by size number of bytes and converting the memory pointer to an Int64</p>

<pre><code>short size = getSize();

IntPtr allocatedObject;

long posInMemory = allocatedObject.Offset(size).ToInt64();
</code></pre>

<p>How can I achieve this in C++: the position in memory of the IntPtr (<code>void *allocatedObject;</code>) and convert the memory pointer to an Int64. </p>

<p>Thanks in advance!</p>
