#include <iostream>
using namespace std;
int main(void)
{
unsigned char test[10];
test[0] = 0x85;
test[1] = 0x3F;
test[2] = 0x85;
test[3] = 0x34;
test[4] = 0x85;
test[5] = 0x3F;
test[6] = 0x85;
test[7] = 0x34;
test[8] = 0x85;
test[9] = 0x3F;
for(unsigned char n : test)
cout << "0x" << std::hex << static_cast<unsigned short>(n) << " " ;//输出十六进制FF
cout << endl;
return 0;
}
/*
$ g++ -o hex_test
$ ./hex_test.exe
0x85 0x3f 0x85 0x34 0x85 0x3f 0x85 0x34 0x85 0x3f
*/