我无法弄清楚如何将十六进制值向量转换为十进制长整数。
vector<uint8_t>v;
v.push_back(0x02);
v.push_back(0x08);
v.push_back(0x00);
v.push_back(0x04);
v.push_back(0x60);
v.push_back(0x50);
v.push_back(0x58);
v.push_back(0x4E);
v.push_back(0x01);
v.push_back(0x80);
//How would I achieve this:
long time = 0x00046050584E0180; //1,231,798,102,000,000
我如何将向量 v 的元素 2-9 变成一个 long int,就像上面用长“时间”表示的那样。
谢谢!