char c = 'A'; cout.setf(ios::hex, ios::basefield); cout.setf(ios::showbase); cout<<static_cast<int>c;. 或 cout<<std::hex<<int(c);. Page 53. [email protected] 2016.
確定! 回上一頁