Hola.
En delphi existen 2 funciones para ello:
SYSTEM.HI y
SYSTEM.LO
Supongo que en C++ también están.
Extracto de la ayuda integrada:
function
Hi(X: Integer): Byte;
Returns the high-order byte of X as an unsigned value.
In Delphi code, use
Hi to obtain the high-order byte of an expression of type Word or Integer.
Note: Hi treats Integer as a 16-bit value, even if it is 32-bit.