"Ramiro Barbosa, Jr." <ra******@yahoo.com> wrote in message
news:9d**************************@posting.google.c om...
John,
How would I use two longs? The primitive long in my platform (win2k)
is 4 bytes only!
Thanks,
-RB
Well, first four bytes into one long, and the next four bytes into the other
long. Something like
long one = (256L*256L*256L)*(unsigned char)array[0] +
(256L*256L)*(unsigned char)array[1] +
(256L)*(unsigned char)array[2] +
(unsigned char)array[3];
long two = (256L*256L*256L)*(unsigned char)array[4] +
(256L*256L)*(unsigned char)array[5] +
(256L)*(unsigned char)array[6] +
(unsigned char)array[7];
(or the other way round of course).
john