这是一个奇怪的...
我正在玩一些减压算法.char buffer[]在buffer[i]找到停止位之前,我没有经过和循环 ,而是尝试使用一些位掩码技术但是使用字符.
我有以下示例:
// In a *.h file
const char ch = '\x81';
// To avoid Endianess
union CharUInt
{
char sz[4];
unsigned int u;
};
// Legal because char[] is declared before uint32 in the union
const CharUInt Mask1 = {'\x81', '\x0', '\x0', '\x81'};
const CharUInt Mask2 = {'\x0', '\x81', '\x81', '\x0'};
// Proxy / Auxillary uint32 as usimg Mask2.u in the switch blocked produced the same errors
const unsigned int uMask1 = …Run Code Online (Sandbox Code Playgroud)