代码:
#include<iostream>
using namespace std;
int main()
{
unsigned long long a = 0x90 << 24;
cout << hex << a; // 输出: ffffffff90000000
}
#include<iostream>
using namespace std;
int main()
{
unsigned long long a = 0x90 << 24;
cout << hex << a; // 输出: ffffffff90000000
}
本文标题:C++ 0x90 左移 24 位的结果有坑
本文链接:https://www.haomeiwen.com/subject/fnkonqtx.html
网友评论