首页 > 编程语言 > 详细

c++ int to hex string

时间:2014-10-13 13:00:41      阅读:478      评论:0      收藏:0      [点我收藏+]

#include <iostream>

#include <sstream>

int main() {

int i = 123;

std::string temp;

std::stringstream ss;

ss << std::hex << i;

ss >> temp;

std::cout << temp << std::endl;

return 0;

}


c++ int to hex string

原文:http://my.oschina.net/lovelyBoy/blog/330048

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!