سؤال

I came across this piece of code, but am not able to entirely make sense of it:

(((x)[y] << 8) | (x)[(y)+1])

where x is a pointer to a const unsigned char and y is an integer.

هل كانت مفيدة؟

المحلول

It extracts the 16-bit big-endian value starting at index y from array x.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top