I assume a pointer is not much different from an unsigned integer: it stores a value between and including 0 and 2^32-1. For a pointer, this equals the targets position in memory measured in bytes from the first byte in memory (0).
I have two pointers. One, pData, points to a valid location in memory with a lot of data. The second one, pPos is supposed to move within this chunk of data like a filepointer (like seek) does within a file.
To move pPos' targetaddress in memory, I wanted to cast it to an integer, add the number of bytes I want to move it and cast it back. So thats what I did:Code:void *pData, *pPos;
Unfortunatly this does not compile. Obviously the compiler "knows what I mean" but doesn't allow it. I assume it does this because there is a better way of doing this in C++. So how do I do that ? Can anybody help me ?Code:(uint)pPos= (uint)pData +iPosition;