Your microcontroller firmware environment does not allow heap allocation, so objects must be constructed inside preallocated static memory.
You must:
Block with two integer fields:idvalueBlockBlock object inside that bufferid and valueid value⚠️ Important: Placement new does not allocate memory and therefore requires explicit destruction.
Example
Input:
7 42
Output:
7 42
Constraints:
new (buffer) Blocknew or deleteBlockobj->~Block();
Input
7 42
Expected Output
7 42