I'm just starting out with x64 compilation.
I have a couple of char*'s, and I'm subtracting them. With a 32-bit compile, this works:
char * p1 = ....
char * p3 = ...
int delta = p3 - p1;
But if I compile for x64 I get a warning:
warning C4244: 'initializing' : conversion from '__int64' to 'int',
possible loss of data
What is the correct type to use, to represent a difference between two pointers, that works in both x86 and x64 compiles?
I know I could use __int64 on the x64 compile, but I want it to work for x86 as well, and I'd like to not embed an #ifdef
here to do it.