Answer the question
In order to leave comments, you need to log in
How to write two digits into one byte in Qt/C++?
Hello there is a QByteArray buf (an array of bytes in Qt) and there are two variables int a and int b . So, let's say a=3 , and b=5 how to do what would happen
|<---buf------>|
|<-----a---->|<-----b---->|
that is, so that as a result the buf element is equal to 0b00110101 or 0x35
I hope I clearly explained what I want. Thanks in advance.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question