Your task is to define an enum class Kind with two enumerators Id and Value of type uint8_t.
Kind
Id
Value
uint8_t
After that, define a struct Packet with:
Packet
kind
id
value
The program will read a string ("Id" or "Value") and a number, store it in the correct union field, and then print it in the format: ID=<id>
VALUE=<value>
Example Input:
Id 42
Output:
ID=42
Input:
Value -10
VALUE=-10
Test Cases
Test Results
Input
Expected Output