Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个字节数组(dB)。我正在尝试一个一个地提取字节。为什么这段代码不起作用?任何指针?逻辑上我错了吗?还是我的实施有问题?
你有这样声明的字节缓冲区:
unsigned char *decodeBuf;
要从该缓冲区中读取单个值,i只需在偏移量处编写:
i
unsigned char b = decodeBuf[i];
尝试
int main() { unsigned char tmp; tmp = getByte(dB+dOffset); dOffset++; }
它应该工作