C++ is compatible with C language, so the programming of C language is also applicable to c++.
When a variable of type Int becomes a byte, you can use coercion and use the following methods:
int a = 120;
a =(char)a;
Then a will be converted to a Byte type.
It is worth noting that int is a double-byte number. When it becomes single byte, the number of high bytes will be automatically omitted.