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()就会有值.
本文详细记录了在使用Visual Studio 2010 SP1过程中遇到的一个Bug,即使用stringstream输出到字符串时,通过c_str()获取的指针为空。文章提供了临时解决方案,并对比了g++编译器的正确行为。
1110

被折叠的 条评论
为什么被折叠?



