阅读背景:

如何通过cout将字符输出为整数?

来源:互联网 
#include <iostream>

using namespace std;

int main()
{  
    char          c1 = 0xab;
    signed char   c2 = 0xcd;
    unsigned char c3 = 0xef;

    cout << hex;
    cout << c1 << endl;
    cout << c2 << endl;
    cout << c3 << endl;
}
#include <iostream>

using namespace std;

int 



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: