请教std::locale的问题
时间: 2013-01-20来源:开源中国
前景提要
HDC调试需求开发(15万预算),能者速来!>>> Setting the global locale has bad side effects. Consider following code:
int main() { std::locale::global(std::locale( "" )); // Set system's default locale as global std::ofstream csv( "test.csv" ); csv << 1.1 << "," << 1.3 << std::endl; }
What would be the content of test.csv ? It may be "1.1,1.3" or it may be "1,1,1,3" rather than what you had expected.


能帮我解释一下这段话吗?为什么可能出现这两种情况呢?

科技资讯:

科技学院:

科技百科:

科技书籍:

网站大全:

软件大全:

热门排行