C++ を使用して、2 つの異なる ID を 1 つの 16 ビット整数に結合する必要があります。その後、この 16 ビット整数を 2 つの元の ID 値にデコードする必要があります。
例:
// Store two integers into one
unsigned short Identifier1 = 12793; //(maximum number 30000)
unsigned short Identifier1 = 5450; //(maximum number 30000)
unsigned short CombinedIDs = 34283; // this is example, I don't know the code for that
// Decode one integer into two
// At this point I only have CombinedIDs value, I need to extract it
// into the two original IDs
unsigned short OriginalIdentifier1 = ...CombinedIDs.. code to get 12793
unsigned short OriginalIdentifier2 = ...CombinedIDs.. code to get 5450