您的位置:首页 > Web前端

再遇"\xff\xfe"

2017-07-08 13:01 72 查看
      话不多说, 看代码:

#include <iostream>
using namespace std;

int main()
{
const char *p = "\xff\xfe";
printf("%d, %d\n", *p, *(p + 1)); // -1 -2
printf("%d, %d\n", (unsigned char)*p, (unsigned char)*(p + 1));  // 255 254
printf("%u, %u\n", *p, *(p + 1)); // 4294967295 4294967294
return 0;
}
      OK
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: