Skip to content

Instantly share code, notes, and snippets.

@hirosof
Created September 21, 2010 13:22
Show Gist options
  • Save hirosof/589681 to your computer and use it in GitHub Desktop.
Save hirosof/589681 to your computer and use it in GitHub Desktop.
typedef struct tagINT24{
__int8 Num[3];
void operator = (int nValue){
Num[0] = nValue & 0xFF;
Num[1] = (nValue & 0xFF00) >> 8;
Num[2] = (nValue & 0xFF0000) >> 16;
}
operator int(){
return Num[0]+ (Num[1] << 8) + (Num[2] <<16);
}
}__int24;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment