weixin_37926485
烫手的热山药
采纳率0%
2021-02-27 17:42

C++ 如何快速获取unsigned char数组中的元素?

 unsigned char data[118] = {
        0x00, 0x00, 0x00, 0x01, 0x67, 0x4D, 0x00, 0x2A,  0x9D, 0xA8, 0x1E, 0x00, 0x89, 0xF9, 0x66, 0xE0,
        0x20, 0x20, 0x28, 0x00, 0x00, 0x38, 0x40, 0x00,  0x0A, 0xFC, 0x84, 0x20 ,0x00 ,0x00 ,0x00 ,0x01,
        0x68, 0xEE, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x01,  0x06, 0xE5, 0x01, 0x00 ,0x80 ,0x00 ,0x00 ,0x00,
        0x01, 0x65, 0xB8, 0x01, 0x3F, 0xB9, 0x92, 0x60,  0x00, 0xF8, 0x6F, 0xF8 ,0x2B ,0xEB ,0xDA ,0x07,
        0x71, 0xBC, 0x64, 0xA0, 0xE1, 0x56, 0x8B, 0x08,  0x45, 0xF8, 0xF9, 0xED ,0x27 ,0x75 ,0xB9 ,0x5E,
        0xD4, 0xAA, 0x61, 0x78, 0x1F, 0xD6, 0xFF, 0xC3,  0xF7, 0x99, 0xA2, 0xAD ,0xC1 ,0x6F ,0x82 ,0x31,
        0xF4, 0x4F, 0x33, 0xCC, 0x6D, 0xE4, 0x45, 0x41,  0xF0, 0x8E, 0x79, 0x9F ,0x12 ,0x8F ,0x4F ,0x00,
        0x55, 0x94, 0xC1, 0xFD, 0x23};

如何快速匹配到0x00 0x00 0x00 0x01 , 并按照0x00 0x00 0x00 0x01 ji

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答