您的位置:首页 > 其它

[开发工具]_[VS2010]_[vs2010的一个bug-使用stringstream时出现]

2017-04-17 17:03 344 查看
1. 注冊Microsfot之后想提交bug, 发现有这个提示, 所以提交不了bug, 有能提交的提交下吧.

You are not authorized to submit the feedback for this connection.


2. VS2010 sp1的bug, temp为居然为空.

TEST(test_Aa,StringStream)
{
std::stringstream ss;
ss << 0;
const char* temp = ss.str().c_str();
std::cout << "temp: " << temp << std::endl;
}


这里我使用vs2010 sp1的temp输出为空, g++就正常输出为0.

vs2010:

temp:


备注: 应该是微软实现的标准库的问题, 找时间研究下. 暂时解决的方法就是先把stringstream转换为string, 再从string调用c_str()就会有值.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐