十六进制内存赋值

char* pCh = "0xe6, 0x97, 0xa0, 0xe7, 0x95, 0x8c, 0xe6, 0xb5, 0x8f, 0xe8, 0xa7, 0x88";字符串的形式存在于内存中,达不到预期

下面两种均可:

unsigned char title[] = {0xe6, 0x97, 0xa0, 0xe7, 0x95, 0x8c, 0xe6, 0xb5, 0x8f, 0xe8, 0xa7, 0x88};
char* ptitle = "xe6x97xa0xe7x95x8cxe6xb5x8fxe8xa7x88";

if (!memcmp(ptitle,title,12))
{
printf ("OK! ");
}

原文地址:https://www.cnblogs.com/xunbu7/p/4313491.html