c++ byte数组转int, int转byte数组,byte数组转16进制字符串,16进制字符串转byte数组
int转byte数组:
void IntToBytes(int num, unsigned char* bytes, int size)
{
for (int i = 0; i < size; i++)
{
int offset = i * 8;
bytes[i] = (num >> offset) & 0xFF;
...
原创
2020-04-10 10:31:41 ·
2813 阅读 ·
1 评论